mpv/audio/out
wm4 5059039c95 player: unrangle one aspect of audio EOF handling
For some reason, the buffered_audio variable was used to "cache" the
ao_get_delay() result. But I can't really see any reason why this should
be done, and it just seems to complicate everything.

One reason might be that the value should be checked only if the AO
buffers have been recently filled (as otherwise the delay could go low
and trigger an accidental EOF condition), but this didn't work anyway,
since buffered_audio is set from ao_get_delay() anyway at a later point
if it was unset. And in both cases, the value is used _after_ filling
the audio buffers anyway.

Simplify it. Also, move the audio EOF condition to a separate function.
(Note that ao_eof_reached() probably could/should whether the last
ao_play() call had AOPLAY_FINAL_CHUNK set to avoid accidental EOF on
underflows, but for now let's keep the code equivalent.)
2014-04-17 23:48:09 +02: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
ao_alsa.c af_lavrresample: remove avresample_set_channel_mapping() fallbacks 2014-03-16 13:19:28 +01:00
ao_coreaudio.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_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: add a missing \n to a log call 2014-04-10 23:58:12 +02:00
ao_null.c ao_null: add simulated device latency, simulate EOF problems 2014-04-17 22:35:05 +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.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_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
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: add hack against broken pulseaudio EOF condition 2014-04-17 22:50:49 +02:00