summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-04-23 22:54:01 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-04-23 22:54:01 +0000
commit6a6c322a197bf07c72010aae40dd63f12e9cf98a (patch)
tree16cb57117cad9703612d7e00ba6c983778fb73a9
parent5cdee94b400237d835ba1a5ec484a83b1b9a4bc7 (diff)
downloadrockbox-6a6c322a197bf07c72010aae40dd63f12e9cf98a.tar.gz
rockbox-6a6c322a197bf07c72010aae40dd63f12e9cf98a.tar.bz2
rockbox-6a6c322a197bf07c72010aae40dd63f12e9cf98a.zip
Improve stop behavior
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9779 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index bc3d773cbb..1ea1c6759c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1784,6 +1784,11 @@ static void stop_codec_flush(void)
pcmbuf_pause(true);
while (audio_codec_loaded)
yield();
+ /* If the audio codec is not loaded any more, and the audio is still
+ * playing, it is now and _only_ now safe to call this function from the
+ * audio thread */
+ if (pcm_is_playing())
+ pcmbuf_play_stop();
pcmbuf_pause(paused);
}