From 5e4532c87cf747600ec1d7ae22531e89ecdce6a4 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 6 Apr 2017 19:32:35 -0400 Subject: Fix a problem with audio not starting on a list of short files Forced audio start was left out when a third codec attempts to start a second track transition. Only one pending transition is allowed at a time. There wouldn't be enough PCM in the buffer to trigger audio playback and audio would just return without giving the pcm buffer a kick. Fixes FS#13100 - Player failed on short tracks Change-Id: I338b0b12022c591930451fd5ed26a2a73008835f --- apps/playback.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/playback.c') diff --git a/apps/playback.c b/apps/playback.c index 8a25375fec..54410ad2cc 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2376,9 +2376,16 @@ static void audio_on_codec_complete(int status) Skipping: There was already a skip in progress, remember it and allow no further progress until the PCM from the previous song has finished + + This function will be reentered upon completing the existing + transition in order to do the one that was just tried (below) */ codec_skip_pending = true; codec_skip_status = status; + + /* PCM buffer must know; audio could still be filling and hasn't + yet reached the play watermark */ + pcmbuf_start_track_change(TRACK_CHANGE_AUTO_PILEUP); return; } -- cgit v1.2.3