summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
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/mpeg.c
parent1cf053982e16a4d1e42e9e129265feef8f2b787c (diff)
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/mpeg.c')
-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 {
#ifndef SIMULATOR
static int last_tag = 0;
static int last_dma_tick = 0;
+static int pause_tick = 0;
#ifndef ARCHOS_RECORDER
static unsigned int bass_table[] =
@@ -592,13 +593,16 @@ static void mpeg_thread(void)
DEBUGF("MPEG_PAUSE\n");
/* Stop the current stream */
playing = false;
+ pause_tick = current_tick;
stop_dma();
break;
case MPEG_RESUME:
DEBUGF("MPEG_RESUME\n");
- /* Stop the current stream */
+ /* Continue the current stream */
playing = true;
+ last_dma_tick += current_tick - pause_tick;
+ pause_tick = 0;
start_dma();
break;