Rockbox mail archive
Subject: [PATCH] bug fix for elapsed time display
From: Nate Nystrom (nystrom_at_cs.cornell.edu)
Date: 2002-07-24
Hi,
I've been playing with rockbox for the last few weeks; I'm very
impressed. I started hacking on the source code this past weekend to
fix some of the low-hanging UI problems on the player model (e.g.,
strings longer than 11 chars, displaying information on lines >= 2).
I'm sorry I don't have the time to contribute much more than a patch now
and then.
Anyway, here's a bug fix. The elapsed time was displayed incorrectly
when a track was paused. The time displayed included the time spent in
a pause. Patch below.
Nate
--- orig/firmware/mpeg.c Wed Jul 24 15:57:36 2002
+++ firmware/mpeg.c Wed Jul 24 15:49:59 2002
@@ -147,6 +147,7 @@
#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[] =
@@ -572,6 +573,7 @@
DEBUGF("MPEG_PAUSE\n");
/* Stop the current stream */
playing = false;
+ pause_tick = current_tick;
stop_dma();
break;
@@ -579,6 +581,8 @@
DEBUGF("MPEG_RESUME\n");
/* Stop the current stream */
playing = true;
+ last_dma_tick += current_tick - pause_tick;
+ pause_tick = 0;
start_dma();
break;
Page was last modified "Jan 10 2012" The Rockbox Crew
|