Rockbox mail archiveSubject: Resume
From: Björn Stenberg (bjorn_at_haxx.se)
I just added Resume support to the CVS code. It handles dir-play resume and playlist resume in normal and shuffled mode, and also does mid-track resume.
Recorders handle all this pretty transparently, using their RTC ram for data that changes frequently (such as position in file).
Players, however, need to write this information to disk. This is handled using so called "delayed writes" that don't actually write the information until the disk is spun up for another reason (reading mp3 data, scanning a dir, whatever). This means that the stored file position at times can be over a minute "behind" on players.
To fix this, I've made it so that when you pause playback, this delayed data is flushed to disk. So to get an accurate mid-track resume on players first pause the playback, let it flush to disk and then shutdown by holding STOP.
There are a few bugs left to squash:
We need to polish this and the ffwd/rew code a bit, but after that I think we're ready to let 1.3 out the door. Good work, everyone!
Page was last modified "Jan 10 2012" The Rockbox Crew