0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/audio
wm4 d268d896d9 ao_jack: fix termination on the end of file
The player didn't quit when the end of a file was reached. The reason
for this is that jack reported a constant audio delay even when all
audio was done playing. Whether that was recognized as EOF by the player
depended whether the exact value was higher or lower than the player's
threshhold for what it considers no more audio.

get_delay() should return amount of time it takes until the last sample
written to the audio buffer reaches the speaker. Therefore, we have to
track the estimated time when the last sample is done, and subtract it
from the calculated latency. Basically, the latency is the only amount
of time left in the delay, and it should go towards 0 as audio reaches
ths speakers.

I'm not sure if this is correct, but at least it solves the problem. One
suspicious thing is that we use system time to estimate the end of the
audio time. Maybe using jack_frame_time() would be more correct. But
apart from this, there doesn't seem to be a better way to handle this.
2014-03-05 18:02:41 +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_jack: fix termination on the end of file 2014-03-05 18:02:41 +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 audio: add channel map selection function 2013-05-12 21:24:57 +02:00
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 command: use the step size for "add volume" commands 2014-02-27 01:07:46 +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