Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Question about anti-skip buffer
« previous next »
  • Print
Pages: [1]

Author Topic: Question about anti-skip buffer  (Read 3029 times)

Offline Adion

  • Member
  • *
  • Posts: 8
    • My Website
Question about anti-skip buffer
« on: September 28, 2007, 05:31:30 PM »
Hi,

I have a little problem with the anti-skip buffer. I use my iHP-120 harddisk player with rockbox while jogging regularly, but sometimes the track just stops and the player instantly skips to the next track.
Because I usually listen to dj mixes this is quite annoying since they are quite long and so a large part is being skipped.

I have the anti-skip buffer set to 10 minutes already, but I doubt it has actually been trying to read for that long because it can switch to the next track so fast.
I think that rockbox may just stop reading the file on a read error and skip to the next file, which would make the anti-skip buffer a little useless. (unless maybe for reads that just take a long time without giving errors)

So I tried to find out what happens in the rockbox source code.
I found out that when the buffer runs out, audio_read_file in playback.c is called. For disk access it calls read() and if that fails it seems to skip to the next track (the log it does is "File ended %ldB early")

In ata.c I found that the read is performed by ata_read_sectors, which does indeed have some mechanism to retry on errors, but only for READ_TIMEOUT time, which is only 5 seconds. After that an error is returned, and from what I understand, no retry is attempted after that, even though there may still be 9 minutes and 55 seconds left in the buffer.

Is what I found correct, or did I miss something in one of the read functions?
If I am correct, I suppose this is sort of a bug, and playback.c should know what was the cause of the read error to decide if it should try again or indeed skip to the next file.
Logged

Offline LinusN

  • Member
  • *
  • Posts: 1914
Re: Question about anti-skip buffer
« Reply #1 on: October 01, 2007, 03:16:43 AM »
The anti-skip buffer is only there to handle successful reads that take longer than usual. I agree that it shouldn't skip to the next file until it has played the rest of the buffer.
If it behaves like that, it is a bug. Please file a bug report.
Logged
Archos Jukebox 6000, Recorder, FM Recorder/iAudio X5/iriver H1x0, H3x0/Toshiba Gigabeat F20/iPod G5, G5.5

Offline fml2

  • Member
  • *
  • Posts: 157
Re: Question about anti-skip buffer
« Reply #2 on: October 01, 2007, 01:30:07 PM »
Quote from: Adion on September 28, 2007, 05:31:30 PM
I use my iHP-120 harddisk player with rockbox while jogging regularly

Apart from all the things said, I wouldn't use a HD based player when jogging. Too dangerous IMHO (for the player I mean ;-).
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Question about anti-skip buffer
« Reply #3 on: October 01, 2007, 01:48:17 PM »
Quote from: fml2 on October 01, 2007, 01:30:07 PM
Apart from all the things said, I wouldn't use a HD based player when jogging. Too dangerous IMHO (for the player I mean ;-).

Makes me wish that Solid State Drives came in a 1.8" form factor... :)
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline Adion

  • Member
  • *
  • Posts: 8
    • My Website
Re: Question about anti-skip buffer
« Reply #4 on: October 01, 2007, 03:58:48 PM »
Quote from: fml2 on October 01, 2007, 01:30:07 PM
Apart from all the things said, I wouldn't use a HD based player when jogging. Too dangerous IMHO (for the player I mean ;-).
I've been using it for three years now I think, and it's still working fine except for this small problem.

I'll file a bug report for it then, maybe I can even fix it myself now that I know what I found was correct.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Question about anti-skip buffer
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.089 seconds with 15 queries.