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

Rockbox mail archive

Subject: Re: Bookmarks on H120 don't seek

Re: Bookmarks on H120 don't seek

From: Ryan Jackson <>
Date: Tue, 12 Jul 2005 00:15:31 -0600

On 7/11/05, Hardeep Sidhu <> wrote:
> The problem with using total elapsed time to determine offset is that it
> can be quite inaccurate when dealing with VBR files (see
> mp3_get_file_pos() for instance).

Of course. I knew that, but I tried too hard to simplify the problem. :-)

> The simplest, although not as accurate, solution I can think of would be
> to use the audiobuffer latency to calculate the difference between the
> current offset and the last offset returned by the codec (similar to how
> the elapsed time is calculated):
> current_offset = last_offset - (audiobuffer_get_latency() * bit_rate);

Good idea. I submitted a patch to do just that. Works great, except
it still winds up being ahead by ~1 second about 90% of the time. So
I just add another second to the latency and calculate using that.
Perhaps the accuracy of audiobuffer_get_latency() could be improved.
Ryan Jackson
Received on 2005-07-12

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