summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-19 22:53:08 -0300
committerwm4 <wm4@nowhere>2013-07-22 02:42:37 +0200
commitdf1922babe66064e1c6122b8ff5696be3c998530 (patch)
treea3f02efa18ef7d9d71e411b8f573522a404c7236 /video
parentf12e14849d764d6b387bb24e86fdebef1f9c2aff (diff)
downloadmpv-df1922babe66064e1c6122b8ff5696be3c998530.tar.bz2
mpv-df1922babe66064e1c6122b8ff5696be3c998530.tar.xz
ao_wasapi0: Support shared mode, better format guessing method
Uses WASAPI in shared mode by default, add :exclusive flag to choose exclusive mode (duh). WASAPI works somewhat different in shared mode: the OS suggests the sample format to use, and the GetBuffer call is done slightly differently. The shared mode driver does not consume audio as fast as it notifies the thread; we need to check how much we're allowed to write. Not doing this correctly results in spamming the console with AUDCLNT_E_BUFFER_TOO_LARGE errors. When guessing formats for exclusive mode, try several sample size and sample rate combinations instead of just falling back to s16le@44100hz. If none of the rates are accepted, tries remixing >6 channels to 5.1 channels. Failing that, tries remixing to stereo. Failing everything, including the CD Red Book format, what else is left to test? Calculate buffer_block_size based on the configured channels and bytes per sample; MSDN docs say nBlockAlign is not guaranteed to be set for anything but integer PCM formats.
Diffstat (limited to 'video')
0 files changed, 0 insertions, 0 deletions