0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/audio/out
wm4 39609fc19a audio/out/push: redo audio waiting
Improve the logic how the audio thread decides how to wait until the AO
is ready for new data. The previous commit makes some of this easier,
although it turned out that it wasn't required, and we still can handle
AOs with bad get_space implementation (although the new code prints an
error message, and it might fail in obscure situations).

The new code is pretty similar to the old one, and the main thing that
changes is that complicated conditions are tweaked. AO waiting is now
used better (mainly instead of max>0, r>0 is used). Whether to wakeup
is reevaluated every time, instead of somehow doing the wrong thing
and compensating for it with a flag.

This fixes the specific situation when the device buffer is full, and
we don't want to buffer more data. In the old code, this wasn't handled
correctly: the AO went to sleep forever, because it prevented proper
wakeup by the AO driver, and as consequence never asked the core for new
data. Commit 4fa3ffeb was a hack-fix against this, and now that we have
a proper solution, this hack is removed as well.

Also make the refill threshold consistent and always use 1/4 of the
buffer. (The threshold is used for situations when an AO doesn't
support proper waiting or chunked processing.)

This commit will probably cause a bunch of regressions again.
2014-09-06 12:59:04 +02:00
..
ao_alsa.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_coreaudio_device.c coreaudio_device: fix overwriting of user input 2014-08-25 10:08:54 +02:00
ao_coreaudio_properties.c ao_coreaudio: move to new log API 2013-08-01 20:32:49 +02:00
ao_coreaudio_properties.h ao_coreaudio: report hardware latency to ao_read_data 2014-07-03 20:05:15 +02:00
ao_coreaudio_utils.c ao_coreaudio: move channel mapping away from utils 2014-07-02 21:43:08 +02:00
ao_coreaudio_utils.h ao_coreaudio: move channel mapping away from utils 2014-07-02 21:43:08 +02:00
ao_coreaudio.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_dsound.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_jack.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_lavc.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao_null.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_openal.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_oss.c ao_oss: minor simplification 2014-09-06 12:58:48 +02:00
ao_pcm.c ao_pcm: minor simplification 2014-09-06 12:58:54 +02:00
ao_portaudio.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_pulse.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_rsound.c ao_rsound: pass correct data type to rsd_set_param() 2014-03-09 19:11:49 +01:00
ao_sdl.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_sndio.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_wasapi_utils.c ao_wasapi: simplify nAvgBytesPerSec calculation 2014-05-28 21:38:15 +02:00
ao_wasapi_utils.h ao_wasapi: Move non-critical code outside of the event thread 2014-03-11 16:37:02 -03:00
ao_wasapi.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_wasapi.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao.h audio/out: remove old things 2014-09-06 02:30:57 +02:00
internal.h audio/out: remove old things 2014-09-06 02:30:57 +02:00
pull.c audio/out: make EOF handling properly event-based 2014-09-05 23:45:54 +02:00
push.c audio/out/push: redo audio waiting 2014-09-06 12:59:04 +02:00