FS#12655 - Low bitrate WMA becomes distorted on Sansa Clip Zip

Attached to Project: Rockbox
Opened by Mark (markemark) - Saturday, 28 April 2012, 13:51 GMT
Last edited by MichaelGiacomelli (saratoga) - Tuesday, 01 May 2012, 21:57 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System Sansa AMSv2
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When playing back certain low-bitrate WMAs with my Sansa Clip Zip, the audio becomes more and more distorted. The easiest way to show the problem in action is with a short low-bitrate WMA (20bps/22khz) I have attatched.

Set repeat to 'one' then playback the file and let it loop. Or press the forward button several times make the distortion happen faster. The audio will get more and more distorted every time the playback loop starts over until all I hear is distortion.

Using current build (04/28 version 8a3824f-120428).
This task depends upon

Closed by  MichaelGiacomelli (saratoga)
Tuesday, 01 May 2012, 21:57 GMT
Reason for closing:  Fixed
Comment by MichaelGiacomelli (saratoga) - Saturday, 28 April 2012, 16:13 GMT
Is this new? wondering if my recent wma fix broke something.
Comment by Mark (markemark) - Sunday, 29 April 2012, 09:01 GMT
I don't think so. The problem's been around since I've bought my clip zip a few months ago. It was only recently I found a way to easily reproduce the problem of increasing distortion at every track change.
Comment by MichaelGiacomelli (saratoga) - Sunday, 29 April 2012, 20:22 GMT
I'll try and find time to look into this. Its probably something stupid like one of the variables not getting reset when playback loops verses when it starts a new track.
Comment by MichaelGiacomelli (saratoga) - Tuesday, 01 May 2012, 02:32 GMT
Ok I think I see the problem. During init, there a table of noise values which are doubled if the file use line spectral pairs (only for WMA files under about 20 kbps). Right now I think if the file is set to repeat, it doubles them each time, instead of just doing it once, so they gradually get more and more wrong as the file loops. Will have to figure out an efficient fix for this problem.
Comment by MichaelGiacomelli (saratoga) - Tuesday, 01 May 2012, 03:43 GMT
Should be fixed in 87d3dde.
Comment by Mark (markemark) - Tuesday, 01 May 2012, 21:56 GMT
Updated to current on my zip. Problem fixed here. Thank you much!