1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-17 12:25:03 +00:00
mpv/audio
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
..
decode Factor out setting AVCodecContext extradata 2014-01-11 01:25:49 +01:00
filter audio/filter: remove redundant log message prefixes 2014-01-24 21:30:15 +01:00
out ao_sdl: use new pull API helpers 2014-03-09 19:08:47 +01:00
audio_buffer.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
audio_buffer.h audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
audio.c audio: check for overflows 2014-01-03 00:42:40 +01:00
audio.h audio: better rejection of invalid formats 2013-11-27 00:16:05 +01:00
chmap_sel.c ao_jack: allow more control about channel layouts 2013-07-07 18:37:55 +02:00
chmap_sel.h
chmap.c m_option, m_config: mp_msg conversions 2013-12-21 21:05:02 +01:00
chmap.h audio: add enum name for speaker id 2014-02-28 20:54:15 +01:00
fmt-conversion.c audio: fix format ID conversion 2013-12-23 21:24:41 +01:00
fmt-conversion.h
format.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
format.h audio: fix signedness of AF_FORMAT_S32P 2014-02-05 18:53:00 +01:00
mixer.c audio/out: feed AOs from a separate thread 2014-03-09 01:27:41 +01:00
mixer.h command: use the step size for "add volume" commands 2014-02-27 01:07:46 +01:00
reorder_ch.c ao_lavc: support non-interleaved audio 2013-11-13 20:10:17 +01:00
reorder_ch.h ao_lavc: support non-interleaved audio 2013-11-13 20:10:17 +01:00