From d2018ebfc6ccb93054ad8cf59a9179ce7e5d26d9 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 25 Jul 2002 22:09:12 +0000 Subject: Pause time counting fix by Nate Nystrom git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1449 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'firmware/mpeg.c') 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; -- cgit v1.2.3