summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-10-25 06:19:27 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-10-25 06:19:27 +0000
commitf512558650175b8834d3a2125d4d3d5a3df78606 (patch)
tree02ff47f4b554e86eb08e5912b32ae6112eec4076 /apps/talk.c
parentb26e396436971b73c8a40f50121c404d643daf51 (diff)
downloadrockbox-f512558650175b8834d3a2125d4d3d5a3df78606.tar.gz
rockbox-f512558650175b8834d3a2125d4d3d5a3df78606.zip
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
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c11
1 files changed, 10 insertions, 1 deletions
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:
318/* stop the playback and the pending clips, but at frame boundary */ 318/* stop the playback and the pending clips, but at frame boundary */
319static int shutup(void) 319static int shutup(void)
320{ 320{
321#if CONFIG_CODEC != SWCODEC
321 unsigned char* pos; 322 unsigned char* pos;
322 unsigned char* search; 323 unsigned char* search;
323 unsigned char* end; 324 unsigned char* end;
325#endif
324 326
325 if (QUEUE_LEVEL == 0) /* has ended anyway */ 327 if (QUEUE_LEVEL == 0) /* has ended anyway */
326 { 328 {
329#if CONFIG_CODEC == SWCODEC
330 mp3_play_abort();
331#endif
327 return 0; 332 return 0;
328 } 333 }
334#if CONFIG_CODEC != SWCODEC
329#if CONFIG_CPU == SH7034 335#if CONFIG_CPU == SH7034
330 CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */ 336 CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */
331#endif 337#endif
@@ -366,9 +372,12 @@ static int shutup(void)
366 return 0; 372 return 0;
367 } 373 }
368 } 374 }
375#endif
369 376
370 /* nothing to do, was frame boundary or not our clip */ 377 /* nothing to do, was frame boundary or not our clip */
371 mp3_play_stop(); 378#if CONFIG_CODEC == SWCODEC
379 mp3_play_abort();
380#endif
372 queue_write = queue_read = 0; /* reset the queue */ 381 queue_write = queue_read = 0; /* reset the queue */
373 382
374 return 0; 383 return 0;