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: 2005-07-12

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 Tue Jul 12 08:18:40 2005

Page was last modified "Jan 10 2012" The Rockbox Crew