summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-09 19:08:47 +0100
committerwm4 <wm4@nowhere>2014-03-09 19:08:47 +0100
commit346c687d5ab2b6b2a876d0e228161252fddbdc4a (patch)
treebd843f6e0e248e51d733cd652c14250a4708338a /wscript
parent3ca034228dc54b359c8ff696bd7a8ba59f08a139 (diff)
downloadmpv-346c687d5ab2b6b2a876d0e228161252fddbdc4a.tar.bz2
mpv-346c687d5ab2b6b2a876d0e228161252fddbdc4a.tar.xz
ao_sdl: use new pull API helpers
One strange issue is that we apparently can't stop the audio API on audio reset (ao_driver.reset). We could use SDL_PauseAudio, but that doesn't specify whether remaining audio is dropped. We also could use SDL_LockAudio, but holding that over a long time will probably be bad, and it probably doesn't drop audio. This means we simply play silence after a reset, instead of stopping the callback completely. (The existing code ran into an underrun in this situation.) The delay estimation works about the same. We simply assume that the callback is locked to audio timing (like ao_jack), and that 1 callback corresponds to 1 period. It seems this (removed) code fragment assumes there 1 one period size delay: // delay subcomponent: remaining audio from the next played buffer, as // provided by the callback buffer_interval += callback_interval; so we explicitly do that too.
Diffstat (limited to 'wscript')
0 files changed, 0 insertions, 0 deletions