FS#5747 - Playback from previous song keeps playing when skipping tracks

Attached to Project: Rockbox
Opened by Michael Sevakis (MikeS) - Sunday, 30 July 2006, 18:22 GMT
Last edited by Steve Bavin (pondlife) - Tuesday, 31 July 2007, 07:59 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When playing a song and *pausing* it, select another track by using joystick right/left or hitting the select button to browse for another sound file to play. Should be paused with track ready. Start playback.

For about a .5-1 second, the previous sound file will continue playback where it left off (peak meters and all) then abruptly start playing the current selection.

Stop doesn't have this problem.
This task depends upon

Closed by  Steve Bavin (pondlife)
Tuesday, 31 July 2007, 07:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed now.
Comment by Paul Louden (darkkone) - Monday, 31 July 2006, 23:58 GMT
It probably doesn't flush the PCM buffer. I'm missing exactly what you do though. You browse for another file, and then click select on it to start it?
Comment by Michael Sevakis (MikeS) - Tuesday, 01 August 2006, 01:24 GMT
I'm guessing that too.

Start playback on a file.
Make sure that's paused somewhere (||).
Browse/skip to something else (even >>|). Even ~browse~ to the same file. |<< Won't do it on the current file.

Try with several formats several times. I can reproduce this at will. It may not do it on non x5 platforms, however. Some iPod owners said there was no problem.
Comment by Rani Hod (RaeNye) - Monday, 18 September 2006, 18:36 GMT
Confirmed on X5 sim with current CVS.
Comment by Michael Sevakis (MikeS) - Friday, 27 October 2006, 10:48 GMT
I'm pretty sure I now know why this occurs but haven't confirmed my suspicion. On Coldfire at least the buffer given to DMA may be unpaused but still have data left (BCR0 > 0) and this remaining data will play out where it left off if pcm_play_pause(true) is called until BCR0 decrements to zero. If tracks are skipped, pcm_play_stop() should be used first to reset and start a DMA transfer with new data.
Comment by Steve Bavin (pondlife) - Tuesday, 31 October 2006, 16:41 GMT
Patch  FS#6266  should resolve this.
Comment by Alistair Marshall (amar) - Wednesday, 25 July 2007, 08:02 GMT
still present in today's SVN (r13976-070725) on my h300
Comment by Steve Bavin (pondlife) - Monday, 30 July 2007, 11:50 GMT
Can you say whether this is fixed by patch #6266? Attached is an H300 build including this.