This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10139 - Broken seeking in very long audio files.
Attached to Project:
Rockbox
Opened by Paul Louden (Llorean) - Saturday, 18 April 2009, 11:18 GMT+2
Last edited by Andree Buschmann (Buschel) - Monday, 20 April 2009, 21:11 GMT+2
Opened by Paul Louden (Llorean) - Saturday, 18 April 2009, 11:18 GMT+2
Last edited by Andree Buschmann (Buschel) - Monday, 20 April 2009, 21:11 GMT+2
|
DetailsI've tested this on Gigabeat S, though it seems reasonable that it's a swplayback / buffering issue.
Tested in r20728. File length is ~21hrs long (audiobook). I have a bookmark 17.5 hours into the file. If I resume the bookmark all is well. If I seek, for example, one second from where I am, I get audio completely unrelated to where I am. If I stop and then resume playback, it resumes that unrelated audio, but the progress bar is now showing that I'm playing from 5.5 hours into the file (which is approximately correct judging from the part of the book I'm now hearing). |
This task depends upon
Closed by Andree Buschmann (Buschel)
Monday, 20 April 2009, 21:11 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fxied with r20755
Monday, 20 April 2009, 21:11 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fxied with r20755
percent = (newtime*100) / id3->length;
[...]
remainder = (newtime*100) % id3->length;
to (e.g. this is used for mp3 cbr files in within the same function)
percent = ( (newtime/1000) *100) / (id3->length/1000);
[...]
remainder = ( (newtime/1000) *100) % (id3->length/1000);
or to (convert newtime to int64, convert result back to uint32)
percent = (unsigned int) ( ( (int64_t)(newtime)*100) / id3->length);
[...]
remainder = (unsigned int)(((int64_t)(newtime)*100) % id3->length);
As far as I can see newtime is sent in milliseconds. Your 17.5h lead to 17.5*3600*1000 ms which are then multiplied with 100. This overflows the uint32-variable "percent". The modulo part is 5.5h long...So, theory seems to match the bug.
Edit: v01 was faulty, please use v02.