1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 13:14:36 +00:00
mpv/audio/out
wm4 665c8b59be audio/out: avoid wakeup feedback loop
When the audio buffer went low, but could not be refilled yet, it could
happen that the AO playback thread and the decode thread could enter a
wakeup feedback loop, causing up to 100% CPU usage doing nothing. This
happened because the decoder thread would wake up the AO thread when
writing 0 bytes of newly decoded data, and the AO thread in reaction
wakes up the decoder thread after writing 0 bytes to the AO buffer.

Fix this by waking up the decoder thread only if data was actually
played or queued. (This will still cause some redundant wakeups, but
will eventually settle down, reducing CPU usage close to ideal.)
2014-05-11 19:00:05 +02:00
..
ao_alsa.c af_lavrresample: remove avresample_set_channel_mapping() fallbacks 2014-03-16 13:19:28 +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 ao_coreaudio: skip unknown channel labels 2014-05-10 14:07:45 +02:00
ao_coreaudio_utils.h ao_coreaudio: use description-based channel layouts 2014-05-10 14:07:45 +02:00
ao_coreaudio.c ao_coreaudio: remove useless code 2014-05-10 14:07:45 +02:00
ao_dsound.c ao_dsound: remove duplicated code 2014-03-16 13:19:28 +01:00
ao_jack.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_lavc.c encode: fix PTS unit mismatch 2014-05-10 10:44:16 +02:00
ao_null.c ao_null: fix unit mismatch with latency option 2014-05-04 16:57:32 +02: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 af_lavrresample: remove avresample_set_channel_mapping() fallbacks 2014-03-16 13:19:28 +01:00
ao_portaudio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_pulse.c ao_pulse: use ao_need_data() 2014-04-15 22:42:15 +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 ao_sdl: make sure our buffer is always larger than what SDL requests 2014-03-10 22:56:23 +01:00
ao_sndio.c audio/out: make draining a separate operation 2014-03-09 01:27:41 +01:00
ao_wasapi_utils.c ao_wasapi: make code shorter 2014-03-30 09:13:52 +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 ao_wasapi: Use the character set conversion functions from io.h 2014-03-11 16:37:22 -03:00
ao_wasapi.h ao_wasapi: Implement AOCONTROL_UPDATE_STREAM_TITLE 2014-03-11 16:37:22 -03:00
ao.c player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
ao.h player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
internal.h player: unrangle one aspect of audio EOF handling 2014-04-17 23:48:09 +02:00
pull.c audio: wake up the core when audio buffer is running low (2) 2014-04-15 22:50:16 +02:00
push.c audio/out: avoid wakeup feedback loop 2014-05-11 19:00:05 +02:00