Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: marc2003 on April 12, 2011, 01:34:01 PM

Title: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: marc2003 on April 12, 2011, 01:34:01 PM
one of my favourite features is now broken.  :'(

trouble is, i have no idea when it last worked. if anybody can point in me in the direction of the change that might have affected it, i can build myself to test.
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: Buschel on April 12, 2011, 02:29:32 PM
Hi, there were several changes to the metadata handling since v3.8. You could check: r29610, r29609, r29606 or r29583. I hope none of these is the cause, those changes were submitted by myself ;)
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: marc2003 on April 12, 2011, 03:56:22 PM
sorry but i think i might be wasting your time. i just tried some freshly encoded files and they play fine even in the current build.

it's only these older files i'm having a problem with. they used to work in rockbox and they still play fine in foobar2000 right now (obviously i tested that before posting) but something must have happened in the meantime - perhaps a tag update. anyway that's something for me to get to the bottom of.

apologies and keep up the great work.
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: Buschel on April 12, 2011, 04:09:31 PM
Well, if those files worked with rockbox before and still work fine (=play gapless) in foobar I am still interested in why they do not work in current rockbox. Can you provide such file (e.g. uploading it somewhere)?
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: marc2003 on April 12, 2011, 05:02:41 PM
it is a rockbox problem after all. i did the unthinkable and coverted lossy to lossy and the new lame 3.98 transcodes play ok.

lame 3.96 originals:

edit: links removed.

Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: Buschel on April 12, 2011, 05:39:59 PM
Confirmed and understood. I want to check how and when this bug came in. As a quick fix try to do the following in apps/metadata.c:

Use
info->enc_padding = ((int)(buf[i+1]&0xF) << 8 ) |  buf[i+2];

instead of
info->enc_padding = ((int)buf[i+1] << 8 ) |  buf[i+2];

With this change the correct amount of padding is read from the Xing header and the sanity check is not acting.

Edit: Sad truth is -> came in with r29323 and is in v3.8 and v3.8.1. Will fix this tomorrow morning. Sorry.
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: marc2003 on April 12, 2011, 06:02:09 PM
ah fixed. thank you for taking the time to look at this. :)
Title: Re: sansa clip v2 doesn't play lame mp3s gaplessly anymore.
Post by: Buschel on April 13, 2011, 01:55:52 AM
Fixed with r29708.