From dade8129fb6815bfdf33b753189cdcb2e4543469 Mon Sep 17 00:00:00 2001 From: kugel Date: Mon, 29 Jun 2009 19:13:50 +0000 Subject: [PATCH] FS#10377 - "PCM buffer remainder is played under too many conditions" by Jeffrey Goode. Prevents playing the remainder of the pcmbuf on manual stop, as it isn't needed in this case. Now the remainder is only played when the music automatically plays out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21569 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 53d2181bc..65d7fbe20 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2179,11 +2179,16 @@ static void audio_stop_codec_flush(void) static void audio_stop_playback(void) { - /* If we were playing, save resume information */ if (playing) { - pcmbuf_play_remainder(); - + /* If still actively playing here, play out the last samples in the track + * before stopping. A manual stop is actually paused at this point, so + * don't continue playback. + */ + if (!paused) + pcmbuf_play_remainder(); + + /* If we were playing, save resume information */ struct mp3entry *id3 = NULL; if (!ci.stop_codec) -- 2.11.4.GIT