FS#11103 - MPC resume doesn't always work

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Sunday, 14 March 2010, 09:52 GMT
Last edited by Andree Buschmann (Buschel) - Sunday, 14 March 2010, 13:33 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Resuming a MPC track doesn't always work; sometimes it start at 0:00. This seem to happens because the MPC codec use id3->offset field as a sample offset, while the Rockbox core use it as file offset. If the resume offset is bigger than the file size, it is reset to zero by the playback code. The mpc decoder library only has a private low-level function for seeking to a particular file offset, so it isn't a trivial fix.
This task depends upon

Closed by  Andree Buschmann (Buschel)
Sunday, 14 March 2010, 13:33 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with r25164 (with additional change to keep precision of time position over save/resume).
Comment by Andree Buschmann (Buschel) - Sunday, 14 March 2010, 13:24 GMT
Good point! This failure happened since ages...

The following patch corrects the usage of rockbox's "offset" when resuming playback and when saving the current position for persistency.