summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-25 22:09:12 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-25 22:09:12 +0000
commitd2018ebfc6ccb93054ad8cf59a9179ce7e5d26d9 (patch)
treeabcc28f1ee925d5ebb7596d01fa461d9d84bdaad /firmware
parent1cf053982e16a4d1e42e9e129265feef8f2b787c (diff)
downloadrockbox-d2018ebfc6ccb93054ad8cf59a9179ce7e5d26d9.tar.gz
rockbox-d2018ebfc6ccb93054ad8cf59a9179ce7e5d26d9.zip
Pause time counting fix by Nate Nystrom
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1449 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 50a9789501..082ed5067c 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -148,6 +148,7 @@ static struct {
148#ifndef SIMULATOR 148#ifndef SIMULATOR
149static int last_tag = 0; 149static int last_tag = 0;
150static int last_dma_tick = 0; 150static int last_dma_tick = 0;
151static int pause_tick = 0;
151 152
152#ifndef ARCHOS_RECORDER 153#ifndef ARCHOS_RECORDER
153static unsigned int bass_table[] = 154static unsigned int bass_table[] =
@@ -592,13 +593,16 @@ static void mpeg_thread(void)
592 DEBUGF("MPEG_PAUSE\n"); 593 DEBUGF("MPEG_PAUSE\n");
593 /* Stop the current stream */ 594 /* Stop the current stream */
594 playing = false; 595 playing = false;
596 pause_tick = current_tick;
595 stop_dma(); 597 stop_dma();
596 break; 598 break;
597 599
598 case MPEG_RESUME: 600 case MPEG_RESUME:
599 DEBUGF("MPEG_RESUME\n"); 601 DEBUGF("MPEG_RESUME\n");
600 /* Stop the current stream */ 602 /* Continue the current stream */
601 playing = true; 603 playing = true;
604 last_dma_tick += current_tick - pause_tick;
605 pause_tick = 0;
602 start_dma(); 606 start_dma();
603 break; 607 break;
604 608