This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10157 - inaccurate seeking while paused
Attached to Project:
Rockbox
Opened by Michael Chicoine (mc2739) - Wednesday, 22 April 2009, 02:42 GMT+2
Last edited by Thomas Martitz (kugel.) - Tuesday, 30 June 2009, 02:21 GMT+2
Opened by Michael Chicoine (mc2739) - Wednesday, 22 April 2009, 02:42 GMT+2
Last edited by Thomas Martitz (kugel.) - Tuesday, 30 June 2009, 02:21 GMT+2
|
Detailsr20769 and prior
Fails on device and simulator. Does not fail with flac, wma, ogg, wav Steps to duplicate failure: 1) start playback of mp3 file (vbr and cbr both fail) 2) pause playback 3) seek forward and stop - this first seek after pausing will always stop where you release the seek button 4) seek forward again and stop - from this point, when you release the seek button, the track will back up 3 seconds from where it was when seek stopped 5) the same happens if you seek backward This behavior is also causes problems with cuesheet support. If you pause an mp3 file that has a cuesheet and use the skip forward or reverse, it leaves you 3 seconds prior to where it should. Subsequent skip forwards are ineffective. Apparently, it skips to the next track in the cuesheet which is 3 seconds forward and then goes back 3 seconds, leaving you where you started. |
This task depends upon
Closed by Thomas Martitz (kugel.)
Tuesday, 30 June 2009, 02:21 GMT+2
Reason for closing: Fixed
Additional comments about closing: Thanks for this. Committed in r21570.
Tuesday, 30 June 2009, 02:21 GMT+2
Reason for closing: Fixed
Additional comments about closing: Thanks for this. Committed in r21570.
The original problem was that after the first seek-while-paused, the PCM buffer was reset as required, but not after subsequent seeks, therefore after more seeks the PCM buffer was filled with content from after the first seek and would have to play them out before playing from the current seek location. This occurred because the condition to clear the buffer was only looking at the PCM play state. If it was paused, which is always is during the first seek, then the buffer was cleared after the seek. But the method used to clear the buffer was a play stop, which meant the PCM play state wasn't paused for the subsequent seeks - it was stopped. The initial solution was to change the condition from the PCM pause state to the playback paused state. (These are not the same. The PCM state is what the PCM play routine is actually doing internally. The playback paused state is true when a manual pause has been commanded). But this interfered with a seek-while-playing operation. A seek-while-playing pauses the PCM play state but does not pause the playback, and it needs the PCM buffer to be cleared as well. So the solution is to clear the buffer when *either* the PCM play state is paused (seek-while-playing) or playback pause is set (seek-while-paused).
Good job, Jeffrey!!