summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-09-28 16:45:23 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-09-28 16:45:23 +0000
commit8b08935a3b3bfcfec60fc5e9a3fef2ef87b739c4 (patch)
treee353953360fbebef8a191b42729c21fd1edb277d
parentc9a78621aff7ae9f8c1e2f6dfbccde9ed1d936bb (diff)
Flush queued voice clips when not playing audio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11087 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index b80cee7486..76f0788583 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -976,8 +976,9 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize)
voice_remaining = 0;
voicebuf = NULL;
voice_boost_cpu(false);
- ci_voice.new_track = 1;
+
/* Force the codec to think it's changing tracks */
+ ci_voice.new_track = 1;
*realsize = 0;
return NULL;
}
@@ -996,6 +997,11 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize)
LOGFQUEUE("voice < Q_VOICE_PLAY");
if (!voice_is_playing)
{
+ /* Slight hack - flush PCM buffer if only being used for voice */
+ if (!playing && pcm_is_playing())
+ pcmbuf_play_stop();
+
+ /* Set up new voice data */
struct voice_info *voice_data;
voice_is_playing = true;
voice_boost_cpu(true);