the crackling is on the right channel

I've done some more testing and listening since. It turns out that there is some crackling on the left channel, it is just very quiet. The crackling sounds very much like clipping. It is definitely not caused by my amp or speakers as it occurs on the headphone output of the Rio as well.

The cracking gets worse as the level of the signal on the channel increases. There are no crackles when the signal on the channel is silent.

I've tested decoding the problem MP2s with other apps that use the same version of the MAD library and no crackling. Which points the finger at the resampling code.

I've also taken a look at the resampling code in the RioPlay source and I'm puzzled. I can't see anywhere that the left and right channels are treated any differently, so I can't see how the crackling can be being generated in the resampling code.

I guess I need to go and play with an MP2 encoder and encode some 44.1khz and 48khz files to see whether the crackling only happens when resampling is happening.
_________________________
Remind me to change my signature to something more interesting someday