summaryrefslogtreecommitdiffstats
path: root/audio/filter/tools.c
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2016-02-19 11:04:29 -0800
committerKevin Mitchell <kevmitch@gmail.com>2016-02-26 15:43:51 -0800
commit31539884c829a0d2aec63d85647110282234a27a (patch)
tree2e84b0ffbb57d8dabdab134868471f6a65da8dae /audio/filter/tools.c
parent5e124a4ac306292be698f8e1ebf7ce3dd15b02ba (diff)
downloadmpv-31539884c829a0d2aec63d85647110282234a27a.tar.bz2
mpv-31539884c829a0d2aec63d85647110282234a27a.tar.xz
ao_wasapi: avoid under-run cascade in exclusive mode.
Don't wait for WASAPI to send another feed event if we detect an underfull buffer. It seems that WASAPI doesn't always send extra feed events if something causes rendering to fall behind. This causes every subsequent playback buffer to under-run until playback is reset. The fix is simply to do a one-shot double feed when this happens, which allows rendering to catch up with playback. This was observed to happen when using MsgWaitForMultipleObjects to wait for the feed event and toggling fullscreen with vo=opengl:backend=win. This commit improves the behaviour in that specific case and more generally makes exclusive mode significantly more robust. This commit also moves the logic to avoid *over*filling the exclusive mode buffer into thread_feed right next to the above described underfil logic.
Diffstat (limited to 'audio/filter/tools.c')
0 files changed, 0 insertions, 0 deletions