1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-17 20:34:58 +00:00
mpv/audio/out
wm4 346c687d5a 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.
2014-03-09 19:08:47 +01:00
..
ao_alsa.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_coreaudio_properties.c ao_coreaudio: move to new log API 2013-08-01 20:32:49 +02:00
ao_coreaudio_properties.h audio/out: make ao struct opaque 2014-03-09 00:19:31 +01:00
ao_coreaudio_utils.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
ao_coreaudio_utils.h audio/out: make ao struct opaque 2014-03-09 00:19:31 +01:00
ao_coreaudio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_dsound.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_jack.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_lavc.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_null.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_openal.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_oss.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_pcm.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_portaudio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_pulse.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_rsound.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_sdl.c ao_sdl: use new pull API helpers 2014-03-09 19:08:47 +01:00
ao_sndio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_wasapi.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao.h audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
internal.h audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
pull.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
push.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00