dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: [PATCH] bug fix for elapsed time display

[PATCH] bug fix for elapsed time display

From: Nate Nystrom <>
Date: Wed, 24 Jul 2002 16:35:20 -0400


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.


--- orig/firmware/mpeg.c Wed Jul 24 15:57:36 2002
+++ firmware/mpeg.c Wed Jul 24 15:49:59 2002
_at__at_ -147,6 +147,7 _at__at_
 #ifndef SIMULATOR
 static int last_tag = 0;
 static int last_dma_tick = 0;
+static int pause_tick = 0;
 static unsigned int bass_table[] =
_at__at_ -572,6 +573,7 _at__at_
                 /* Stop the current stream */
                 playing = false;
+ pause_tick = current_tick;
_at__at_ -579,6 +581,8 _at__at_
                 /* Stop the current stream */
                 playing = true;
+ last_dma_tick += current_tick - pause_tick;
+ pause_tick = 0;
Received on 2002-07-24

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy