Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: Loothor on January 25, 2008, 07:29:13 PM

Title: Intermittent MP3 playback delays with iAudio X5L
Post by: Loothor on January 25, 2008, 07:29:13 PM
After updating my X5L to a fairly recent build (16083, I believe) I began experiencing the following problems:

Database updating took a very long (sometimes upwards of an hour) and playback of MP3 files (I only use MP3s, so I can't comment on other file types) often took a long time to start, sometimes as long as several minutes or would fail to start at all.
Once started, playback would intermittently pause for several seconds, play for a while (maybe 2 to 30 seconds), then get "stuck" again for several seconds or occasionally forever, play for a little while, get stuck again, etc.  Skipping to the next song would generally cause the intermittent playback to become worse and worse until I was forced to reboot the X5L.  If I checked out the buffering threads in the debug menu during playback, I found they'd get partially full, then starve back to 0 for a while, fill partially again, etc.

After much fooling around with anti-skipping buffer length, directory caching, database RAM caching, chkdsk runs, etc., I found a solution to this problem that seems to have completely solved it, so I am posting here to try to save anyone else with a similar problem my frustration:

I had all (3300 or so, totalling around 13GB) of my MP3 files in one directory ("\MUSIC") on the root of my player's hard drive.  Reorganizing this directory to place all of my files in a series of subdirectories, none of which contain more than a couple hundred files, reduced my Database update time down to just a couple minutes and once again enabled flawless playback.

I already had my player set to allow 10000 files per directory, so this was not the problem, but it seems the latest versions of Rockbox on the X5L are not happy with thousands of files in a single directory.
Title: Re: Intermittent MP3 playback delays with iAudio X5L
Post by: NicolasP on January 26, 2008, 11:15:58 AM
Thanks for the report and precise description ! This is quite a big problem currently and we have some tasks in the tracker that report it too: FS#8397 (http://www.rockbox.org/tracker/task/8397) and FS#8260 (http://www.rockbox.org/tracker/task/8260) mainly.

As I said in one of those tasks, your report makes me think that the problem could be database-related. More specifically, I think it could be with the "gather runtime data" feature, which makes the playback code call DB functions on each track (un)buffering event.

Do you have "gather runtime data" enabled? If so, could you try with it disabled? also maybe it would be worth trying with no DB at all (just wiping the DB files from /.rockbox should do).
Title: Re: Intermittent MP3 playback delays with iAudio X5L
Post by: cdtmbu on January 28, 2008, 03:18:31 AM
I had the same problem (On an IPOD 5.5G, using r15832). Have not checked the "Gather Runtime" feature. But initialised the database a while ago. After this playing flac files from a folder with ~20 files leads to the skipping and disk spinning problem. After reading above I deleted all *.tcd files form the .rockbox folder, rebooted.
Now everything plays like a charm (no skipping, no spinning anymore).
Thanks for this solution!
Title: Re: Intermittent MP3 playback delays with iAudio X5L
Post by: wamba on January 28, 2008, 05:07:19 PM
The same happened to my ipod 5.5g (80GB). The battery drained very fast. Listening to a simple song was hardly possible because of constant skipping and the lack of button response. Even pausing the song was almost impossible.

Fortunately, deleting the .tcd files apparently brought the ipod back to normal.
Title: Re: Intermittent MP3 playback delays with iAudio X5L
Post by: kubu4 on January 29, 2008, 08:37:13 PM
Thanks for the heads up with this.  Deleting the .tcd files has taken care of the problem on both my X5 and H140.  However, gapless playback is still not working...