summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Doyon <s.doyon@videotron.ca>2007-10-18 00:17:15 +0000
committerStéphane Doyon <s.doyon@videotron.ca>2007-10-18 00:17:15 +0000
commite5ba649d85ef44d4a3da261777ca03501acfbbf8 (patch)
tree01c1c6a018a0f65f1c5f98c4d361520ff683f820
parent1cca3ceeefaf23b6da825f20fac7f6a398d7bf80 (diff)
downloadrockbox-e5ba649d85ef44d4a3da261777ca03501acfbbf8.zip
rockbox-e5ba649d85ef44d4a3da261777ca03501acfbbf8.tar.gz
rockbox-e5ba649d85ef44d4a3da261777ca03501acfbbf8.tar.bz2
rockbox-e5ba649d85ef44d4a3da261777ca03501acfbbf8.tar.xz
Fix a problem that caused stale pcm data to be played subsequent to a
voice shutup. Observed when moving through a few voiced items in very quick succession. This is for the case where music playback is not in progress, only voice is playing. The first few samples of audio data for voicing the first skipped item make it to the pcm buffer, but the shutup comes before enough pcm data has accumulated to actually start pcm playback. The condition at the top of voice_on_voice_stop() is therefore false, pcmbuf_play_stop() is not called, and the beginning of the interrupted utterance is left to wait in the pcm buffer. That data will end up prepended to the following voice clip to be played, causing a kind of stuttering effect. The fix is to remove the condition on pcm_is_playing() in voice_on_voice_stop(): always clear the pcm data, it's harmless if there wasn't any. Thanks to jhMikeS for his assistance. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15176 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 0fd1c21..c0a8c5a 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1130,7 +1130,7 @@ static size_t voice_filebuf_callback(void *ptr, size_t size)
/* Handle Q_VOICE_STOP and part of SYS_USB_CONNECTED */
static bool voice_on_voice_stop(bool aborting, size_t *realsize)
{
- if (aborting && !playing && pcm_is_playing())
+ if (aborting && !playing)
{
/* Aborting: Slight hack - flush PCM buffer if
only being used for voice */