• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Music playback
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.6
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by tominated - 2010-11-04
Last edited by Buschel - 2011-02-03

FS#11719 - 48Khz FLAC and ALAC playing slow

When playing any lossless track that has a 48Khz sampling rate, rockbox incorrectly shows the song time longer than it actually is, and plays it slowly. E.G. Hurt by Nine Inch Nails is shown to be and plays for 6 minutes and 50 seconds, but it is actually 6 minutes 17 seconds

Closed by  Buschel
2011-02-03 09:28
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixed with r29201.

nls commented on 2010-11-04 13:47

could you attach such a file or post a link to one?
EDIT: i hexedited a flac file so it was played back as 48kHz and that worked fine, playtime was appropriately shortened.

Here’s a copy of ‘March of the Pigs’ off the same album: I just noticed then, that the FLAC files don’t have an issue (probably should’ve checked more thoroughly), but it’s the ALAC copies that I have. Here’s the ALAC copy that is slower than it should be:

nls commented on 2010-11-06 09:48

something is weird with that alac file, its metadata says it’s 44.1kHz and that is what rockbox uses. None of my playback software can play back the file correctly but they do determine the correct duration and sample rate in some cases so there must be a different method for determining this although i would say this file is broken.

edit: a more recent version of ffmpeg decodes the file just fine but uses the 44.1kHz sample rate just as rockbox does. So i don’t think this is a bug in rockbox, does the file play at its intended sample rate in any player?

I never thought to try it in another player. In iTunes it works perfectly, but in VLC it jitters all over the place. I use a mac primarily, so I haven’t tried anything else.

I cannot compare with other *.alac files as I do not own such files. But if you take a look into the file with a hex-editor you will see that there are two “alac” IDs in it. The first is followed by 0x00AC44 = 44100 (offset of 22 bytes to “alac”), the second is followed by 0x00BB80 = 48000 (offset of 24 bytes to “alac”).

Edit: With the attached patch this file plays correct with the correct sampling rate. Does this also work for other alac files?

Good news: We never parsed the right “alac” atom to gather the samplingrate.
Bad news: For now I see no other solution than to parse until we find this “alac” atom.

I am not satisfied with this solution and will further investigate.


Available keyboard shortcuts


Task Details

Task Editing