Improve stop behavior

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9779 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-04-23 22:54:01 +00:00
parent 5cdee94b40
commit 6a6c322a19

View file

@ -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);
}