summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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