From f512558650175b8834d3a2125d4d3d5a3df78606 Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Wed, 25 Oct 2006 06:19:27 +0000 Subject: Only flush PCM buffered voice data when explicitly told to. Patch by Stephane Doyen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11331 a1c6a512-1295-4272-9138-f99709370657 --- apps/talk.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/talk.c') diff --git a/apps/talk.c b/apps/talk.c index d03fead233..b5fa06d750 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -318,14 +318,20 @@ re_check: /* stop the playback and the pending clips, but at frame boundary */ static int shutup(void) { +#if CONFIG_CODEC != SWCODEC unsigned char* pos; unsigned char* search; unsigned char* end; +#endif if (QUEUE_LEVEL == 0) /* has ended anyway */ { +#if CONFIG_CODEC == SWCODEC + mp3_play_abort(); +#endif return 0; } +#if CONFIG_CODEC != SWCODEC #if CONFIG_CPU == SH7034 CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */ #endif @@ -366,9 +372,12 @@ static int shutup(void) return 0; } } +#endif /* nothing to do, was frame boundary or not our clip */ - mp3_play_stop(); +#if CONFIG_CODEC == SWCODEC + mp3_play_abort(); +#endif queue_write = queue_read = 0; /* reset the queue */ return 0; -- cgit v1.2.3