summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2006-06-21 04:16:18 +0000
committerHardeep Sidhu <dyp@pobox.com>2006-06-21 04:16:18 +0000
commit75117cc993442303009f64b7c1951cfa7dbe1887 (patch)
tree94c0c7d5ac0e28b166402b8125eb1f1bb99e1ad0
parent186bb51fcc700fd0423e8e8e5334d0aa90c1caa6 (diff)
downloadrockbox-75117cc993442303009f64b7c1951cfa7dbe1887.tar.gz
rockbox-75117cc993442303009f64b7c1951cfa7dbe1887.zip
Wait for voice to complete before stopping playback. Fixes hang when stopping from filetree while voice is playing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10141 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 1e6bfa5fe7..ecfb93363e 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1836,6 +1836,11 @@ static void audio_stop_playback(void)
1836 playlist_update_resume_info( 1836 playlist_update_resume_info(
1837 (playlist_end && ci.stop_codec)?NULL:audio_current_track()); 1837 (playlist_end && ci.stop_codec)?NULL:audio_current_track());
1838 } 1838 }
1839
1840 if (voice_is_playing)
1841 while (voice_is_playing || !queue_empty(&voice_codec_queue))
1842 yield();
1843
1839 filebufused = 0; 1844 filebufused = 0;
1840 playing = false; 1845 playing = false;
1841 filling = false; 1846 filling = false;