summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-29 15:10:30 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-29 15:10:30 +0000
commitaecca6693fe7effd5f22098c284d17927a113d27 (patch)
tree210966a2716727dd42f006351ec4f91583afe914 /apps
parentd400e23e38daeed71e0cabcf065b55c1d15023d7 (diff)
Update "elapsed" and "offset" in the mp3entries on the main buffer in the corresponding codec callbacks.
This should fix FS#8040. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15360 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index e42f9b172d..239dc7bc0f 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1473,11 +1473,15 @@ static void codec_set_elapsed_callback(unsigned int value)
latency = pcmbuf_get_latency();
if (value < latency)
+ {
curtrack_id3.elapsed = 0;
+ bufgetid3(CUR_TI->id3_hid)->elapsed = 0;
+ }
else if (value - latency > curtrack_id3.elapsed ||
value - latency < curtrack_id3.elapsed - 2)
{
curtrack_id3.elapsed = value - latency;
+ bufgetid3(CUR_TI->id3_hid)->elapsed = value - latency;
}
}
@@ -1490,9 +1494,15 @@ static void codec_set_offset_callback(size_t value)
latency = pcmbuf_get_latency() * curtrack_id3.bitrate / 8;
if (value < latency)
+ {
curtrack_id3.offset = 0;
+ bufgetid3(CUR_TI->id3_hid)->offset = 0;
+ }
else
+ {
curtrack_id3.offset = value - latency;
+ bufgetid3(CUR_TI->id3_hid)->offset = value - latency;
+ }
}
static void codec_advance_buffer_counters(size_t amount)