FS#832 - playback 'skips'

Attached to Project: Rockbox
Opened by Anonymous Submitter - Monday, 27 January 2003, 04:35 GMT
Last edited by Björn Stenberg (zagor) - Tuesday, 15 April 2003, 22:42 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System
Severity High
Priority Urgent
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In build 20030121.ajz [recorder], I have experienced
some strange skips while the player is subject to
moderate motion [moving car]. No problem whatsoever
if the player is stationary. I have reproduced this with
two different hard-disks. Version 1.4 does not show the

The problem: while playing back hour long radio
recordings, somewhat infrequently [once every 5-10
minutes or so], I get a half-second or so snip of
something that played a few minutes before, along with
a skip in the time-line of more than a half-second. If I
rewind and replay, no problem. One of the disks [an
ibm] ran the ibm diagnositc [long version] with no errors
[no test available for the other drive].

Just a guess, it looks like something very different is
being done on a re-read than with version 1.4.

Model jbr20101, fw version 2.8, build 20030121.ajz
This task depends upon

Closed by  Björn Stenberg (zagor)
Tuesday, 15 April 2003, 22:42 GMT
Reason for closing:  Fixed
Comment by Björn Stenberg (zagor) - Tuesday, 28 January 2003, 13:16 GMT

Try a later build. I never get that.
Comment by Anonymous Submitter - Tuesday, 28 January 2003, 16:19 GMT

Have not been able to reproduce it with later build [0127], but
bugs that nobody can point to the fix tend to still be there...
[and come back when least expected].
Comment by Björn Stenberg (zagor) - Thursday, 06 February 2003, 00:24 GMT

Found this additional info from Clay on the funmp3 forum:

I believe I saw the same problem [still] in build 20030121
[recorder] on a 48kBit/s, 22,050Hz, Stereo file.
Comment by Linus Nielsen Feltzing (linusnielsen) - Thursday, 27 March 2003, 20:30 GMT

This should be fixed now. Can you confirm that?
Comment by Daniel Stenberg (bagder) - Tuesday, 15 April 2003, 07:27 GMT

Lack of feedback. Assumed fixed.
Comment by Mike Holden (mikeholden) - Tuesday, 15 April 2003, 08:18 GMT

Could this be due to the bug I raised in the mailing list a bit ago, where
the fileposition and cacheoffset values are not updated readwrite()
when we get a disk read error returned, but we successfully read
headbytes? It sound like the same problem.

We need to set
file->fileoffset += nread
file->cacheoffset = -1
before early returning.

Not setting these could result in the same headbytes being read on the
next read, thus repeating up to 1 sector's worth (512 bytes) of playback.