Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Music playback
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Jeffrey Goode - 2009-06-15
Last edited by Dan Everton - 2009-06-17

FS#10335 - End of file not played at end of playlist

The last thousand or so samples of a file are not output when played as the last file in the playlist.

To duplicate, play the attached file with another file following it in the playlist, even itself using repeat. There is a distinct chirp at the very end that will be played if another file follows, which is correct. However, if the file is played at the end of the playlist, the chirp is not played. The last samples are omitted from playback.

This behavior occurs on the Sansa e200 target and in the Sansa e200 simulator build. It also occurs on other simulator builds: iriver H120/H140, Creative Zen Vision, and iPod Nano. I didn’t try to build others.

Closed by  Dan Everton
2009-06-17 08:48
Reason for closing:  Accepted
Additional comments about closing:  

Thanks!

Jeffrey Goode commented on 2009-06-16 01:51

Here’s a fix for this bug. The samples were being correctly written to the PCM buffer. But after the last regular PCM buffer flush the remaining samples were left hanging in the buffer when playback ended. This patch performs one last buffer flush when playback is over.

Thomas Martitz commented on 2009-06-16 07:18

Won’t that delay manual stops? How long are the samples missing?

Jeffrey Goode commented on 2009-06-16 14:30

In practice, the maximum number of samples that would have to be flushed at the end of playback (including manual stops) is always less than 8704. A manual stop seems to generate a remainder of 7680 samples. That represents just under 1/5 of a second. If this is objectionable for a manual stop, then the buffer length could be forced to 0 when a manual stop is received. I personally don’t perceive any delay.

Jeffrey Goode commented on 2009-06-16 15:08

Looking further into it, it appears that this patch has no effect on a manual stop. This patch merely commits the remaining samples to the end of the buffer, but since playback after a manual stop has already ceased, they’re thrown out along with whatever else was buffered ahead. The remaining samples are actually played only when the buffer is completely played out, i.e. at the end of the playlist.

Jeffrey Goode commented on 2009-06-16 15:16

The play remainder call was moved to the if (playing) block.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing