Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Fast forward and reverse
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2002-05-28


Matt.OReilly_at_wachovia.com wrote:

> Perhaps a portion of the cache can be reserved for already-played
> material? They have a 2mb cache, correct? I would speculate that
> reserving 0.5mb would be more than enough for most people, about 30
> seconds for going backwards.

The downside to this approach is that we will then have 30 seconds less
buffer for normal playback, resulting in shorter battery life.

I think the simplest method will probably suffice. Currently we keep one
play and one read pointer in the mp3 buffer. That is, one pointer for
where the playback is currently and one for where the end of read data is:

        Read pointer Play pointer
          | |
----------+-------------------------------+-----------
Start End

When rewinding, we will be able to reuse all data to the left of "play",
all the way back to "read". This amount will vary depending on when the
last disk read was performed. If done very recently, the play pointer will
be very close to the read pointer:

        Read Play
          | |
----------+----+--------------------------------------
Start End

In this case, we can only rewind a little before having to read data from
disk.

This way, we don't have to design a special system for rewinding. We just
use what we already have, but still get a better result than the Archos
firmware.

-- 
Björn



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