From 8c5c92dc2c263a0a7821d0c6226738b6276fd6fe Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 29 Jun 2009 19:13:50 +0000 Subject: 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(-) (limited to 'apps') diff --git a/apps/playback.c b/apps/playback.c index 53d2181bcf..65d7fbe204 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) -- cgit v1.2.3