summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-07 17:35:09 +0200
committerwm4 <wm4@nowhere>2017-07-07 17:54:05 +0200
commit90dd2298713d3414bad39b6e8648490cd9f52603 (patch)
treee1da2c0b5d04a2e2fd6bce752131dd3089e603f9 /audio/out/ao_wasapi.h
parent7c1db05cbb386522017942a173cc9552637a660e (diff)
downloadmpv-90dd2298713d3414bad39b6e8648490cd9f52603.tar.bz2
mpv-90dd2298713d3414bad39b6e8648490cd9f52603.tar.xz
audio/out: add helper code to do 24 bit conversion in AO
I plan to remove the S24 sample formats in mpv. It seems like we should still support this _somehow_ in AOs though. So the idea is to convert the data to more obscure representations (that would not be useful for filtering etc. anyway) within the AO. This commit adds helper to enable this. ao_convert_fmt is meant to provide mechanisms for this, rather than a generic audio format description (as the latter leads only to overly generic misery). The conversion also supports only cases which we think will be needed at all. The main advantage of this approach is that we get S24 out of sight, and that we could support other crazy formats (like S20). The main disadvantage is that usually S32 will be selected (if both S32 and S24 are available), and there's no user control to force S24. That doesn't really matter though, and at worst makes testing harder or will lead to unpleasant arguments with audiophiles (they'd be wrong anyway). ao_convert_fmt.pad_lsb is ignored, although if we ever find a case in which playing S32 with data in the LSBs breaks when playing it as padded 24 bit format. (For example, WAVEFORMATEXTENSIBLE recommends setting the unused bits to 0 if wValidBitsPerSample implies LSB padding.)
Diffstat (limited to 'audio/out/ao_wasapi.h')
0 files changed, 0 insertions, 0 deletions