Files
mpv-joc/fork/files/audio
TheM14 23a94a60fa Remove the PCM queue gate and drain EOF gradually
The queue gate stopped feeding PCM once the decoded-ahead count exceeded
PCM_MAX_QUEUE_SAMPLES.  On Android that happened at samples_out=97856
(about 2.04 s); process_pcm then returned without reading another packet,
so playback ended after the buffered two seconds.

Remove the gate and its constant.  At EOF, do not call joc_stream_flush()
while a large PCM backlog is still queued.  Instead push one frame of
silence at a time, compare joc_stream_status().samples_in with the actual
input duration, and only flush after the queued PCM has been rendered.
emit() still truncates output at pcm_input_samples, so the drain silence
never reaches the listener.  This restores full-length playback and avoids
rendering the whole EOF backlog in one operation.
2026-11-14 03:06:11 +08:00
..