0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/audio
wm4 e38b0b245e ao_alsa: don't silence legitimate underrun if final chunk underruns
It turns out that case 2) mentioned in the previous commit happened
quite often when playback ended normally.

There is probably a legitimate underrun with normal buffer sizes (100
ms, 4 fragments, gapless audio in "weak" mode). This is a result of the
player waiting for video to end, and/or the time needed to kill the
video window. The former case means that it depends on your test case
whether it happens (a file where video ends slightly before audio is
less likely to trigger it).

This in turn is due to how gapless playback works. Achieving not having
a "gap" requires queuing the audio of the next file without playing a
partial chunk (as AOPLAY_FINAL_CHUNK would do). The partial chunk is
then played as part of the first chunk played from the next file. But if
it detects "later" that there is no next file, it still needs to get rid
of the last fragment with AOPLAY_FINAL_CHUNK. At this point it's too
late, and an underrun may have actually happened. The way the player
uninits and reinits the entire playback engine for the next file in a
"serial" manner means it cannot know in advance whether this works.

This is the reason why the idiot who added the underrun exception for
the last chunk in play() was wrong (I wrote that btw., before you accuse
me of being rude). Yes, it's a real underrun, and you could probably
hear it.
2019-10-06 20:46:22 +02:00
..
decode ad_lavc: log on failure to read AVFrame 2019-09-27 21:24:24 +02:00
filter audio/filter: remove no longer used header 2019-10-05 12:36:38 +02:00
out ao_alsa: don't silence legitimate underrun if final chunk underruns 2019-10-06 20:46:22 +02:00
aframe.c Implement backwards playback 2019-09-19 20:37:04 +02:00
aframe.h Implement backwards playback 2019-09-19 20:37:04 +02:00
audio_buffer.c audio_buffer: fix some more theoretical UB 2019-09-19 20:37:05 +02:00
audio_buffer.h audio_buffer: remove dependency on mp_audio 2017-09-21 04:10:19 +02:00
chmap_sel.c audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
chmap_sel.h audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
chmap.c chmap: remove misleading "downmix" channel layout name 2017-06-24 11:36:10 +02:00
chmap.h player: remove special-case for DL/DR speakers 2016-08-04 19:14:35 +02:00
fmt-conversion.c audio: add support for AV_SAMPLE_FMT_S64* 2019-09-27 21:21:34 +02:00
fmt-conversion.h audio/fmt-conversion: change license to LGPL 2017-05-05 07:25:55 +02:00
format.c audio: fix copy&paste error 2019-09-27 21:31:04 +02:00
format.h audio: add support for AV_SAMPLE_FMT_S64* 2019-09-27 21:21:34 +02:00