Left and right channels reversed when playing .WAV files

If this is true, probably no one has reported it before now because nobody wastes the spece to put full-blown WAV files on these players. They only have WAV support because that’s what format they record (Voice & FM) in.

Anybody wishing to store and listen to non-lossy music usually uses FLAC format on a portable player, not WAV.

@xcvbnm wrote:

    Sansa Clip Plus V01.02.15A has a serious firmware bug: when playing .WAV files, the left and right channels are reversed.

 

This piqued my curiousity ever since it was posted as we hadn’t heard this at all from anyone. I had a chance to test it today

 

I went to audiocheck.net and downloaded WAV files specifically designed to test right & left channel output. Handy if you want to check to make sure your stereo speakers are hooked up correctly, and perfect for testing this suggestion (that the Clip+ plays WAV files reversed).

 

After downloading and installing them on my Clip+ (with the latest 01.02.15A firmware), I’m happy to report my Clip+ plays them as it should  The left.wav played through the left earphone and the right.wav played through the right earphone.

 

I don’t know how you are hearing WAV files backwards (channel-wise); maybe if you could upload the file(s) that you feel demonstrate this phenomenon to a file-hosting site and post a link to it here, we could have a listen and maybe figure out what is going on?

 

Sorry, but as far as I can tell (so far at least), this is not a firmware bug.

    I tried the files from audiocheck.net, and they played correctly. However, I do have many .WAV files that play with the channels reversed. Is it possible I could e-mail them? Right now, I have two .WAV files, one is 110,000 bytes, and the other one is 3,000,000 bytes. These two files play correctly with Windows Media Player, VLC Player, and Nero Media Player, but on Sansa Clip Plus the left and right channels get reversed. These two files also freeze Sansa Clip Plus when they finish playing, but that’s because I split the original .WAV files, which may have been too large to e-mail, and created these 110,000- and 3,000,000-byte pieces. The full .WAV files play with the channels reversed, but do not freeze the player.
    I haven’t been able to figure out how to predict which .WAV files will play correctly on Sansa Clip Plus, and which will have the channels reversed. Therefore, I wouldn’t exclude a possibility that the channels get reversed and switched back intermittently while playing the same file.

Check whats in the files in Windows (right clikc -> properties) or almost any audio player.  The ones that are reversed are probably some unusal format.  

    No, these are the usual .WAV files that I ripped from audio CDs. Here are FFPROBE.EXE reports on both files:

File 1 (full version):
  Input #0, wav, from ‘FILE1.WAV’:
    Duration: 00:00:12.38, bitrate: 1411 kb/s
      Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

File 1 (the 110,000-byte piece):
  Input #0, wav, from ‘FILE1.WAV’:
    Duration: 00:00:12.38, bitrate: 71 kb/s
      Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

File 2 (full version):
  Input #0, wav, from ‘FILE2.WAV’:
    Duration: 00:04:18.54, bitrate: 1411 kb/s
      Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

File 2 (the 3,000,000-byte piece):
  Input #0, wav, from ‘FILE2.WAV’:
    Duration: 00:04:18.54, bitrate: 92 kb/s
      Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

    I can e-mail you the files, if you’d like, and you are welcome to post a link to them. I just don’t have time right now to search for a file-hosting site myself.

Can I ask–and maybe I’m just missing something here–but even if the Clip is reversing the left and right channels, is it really a major deal, apart from the ocassional surprise from it if you’re used to things otherwise? Again, the amount of listening to wav files on the Clips likely is low, given the amount of space those files take. (Yes, I know that the player just should get it right, but it is what it is.)

Have you tried ripping these CD’s with another program? Maybe that’s what’s reversing the channels. If you loaded and played the test files and they are OK, seems to me that the Clip+ is not at fault here; there must be something else going on with the files. First place I’d look is the program that ripped them from the CD.

     But Windows Media Player, VLC Player, and Nero Media Player play the same files correctly. The channels do not get reversed. Only Sansa Clip Plus sees the channels reversed.

OK, maybe it has something to do with the fact that you split them up into smaller files. Whatever, I would re-rip them, possibly with both the ripping program used the first time and another one to hopefully isolate the cause.

It will take less time than you’re spending in this back & forth asking what it could be. :wink:

And as Miikerman asked before . . . other than the fact that it is "wrong’, does it really matter or bother you that much? Does it irreparably affect your ability to enjoy the music?

Your best bet is probably to just use FLAC or Rockbox (or both since battery life is terrible if you use FLAC without rockbox).  

That said I’m vaguely curious about those files, so if you post a download link that doesn’t involve me waiding through 1000 porn ads I might take a look at it.

Here are the files:

http://files.sansabug.webnode.com/200000001-bf2e7c028a/L_REV_1.WAV

http://files.sansabug.webnode.com/200000000-8c8678d017/L_REV_2.WAV

So exactly what should we be listening for to determine if it’s playing correctly or is ‘reversed’?

Use VLC Media Player to play the files.
The smaller file has a voice saying “Left” and “Right”; when the voice says “Left”, the sound comes from the left, and when the voice says “Right”, the sound comes from the right.
The bigger file has music where the singer’s voice clearly comes from the left.
Now, copy both files onto Sansa Clip Plus V01.02.15A, disconnect Sansa from the computer, disconnect the headphones from the computer’s headphone jack, connect the headphones to the Sansa’s headphone jack, and press Sansa’s Play button.
The voice saying “Left” will be heard from the right, the voice saying “Right” will be heard from the left, and the singer’s voice will be coming from the right.

These files will also freeze Sansa when they finish playing.

The specifications for the player don’t even claim .WAV support. There is some basic wav support since that is what the player records in, however there is no claim that the player will play .WAV files other than the ones it recorded. Next time if you want a player with .WAV support, then choose one that lists WAV support as a specification. Very few players support .WAV, however many digital recorders support WAV.

There’s something definitely wonky with those files!

I don’t have VLC (and wasn’t about to download another program to try them out), but tried to play them in Windows Media Player. I got an error message saying WMP couldn’t play it because it was an unsupported file type. WMP does indeed support WAV files and I have others that play perfectly fine through it.

However, even as this error message was displaying, the L_REV_2.WAV file would play; and the voice came out of the left speaker. Funny thing though, the time listed for the file (in WMP) was over 4 minutes and in actuality it is only like 17 seconds long (if I’m remembering correctly). The L_REV_1.WAV file wouldn’t play at all.

I then fired up Winamp. Both files played fine and the appropriate sound came out of the appropriate speaker. Winamp gave me no error messages.

I then transferred the files to my Clip+ (with the .15 firmware) to both the internal memory and external memory card, plugged in my earphones (taking special note to get the right phone in the right ear and left phone in the left ear) to have a listen. Sure enough as you said, the left channel was playing in the right ear. The L_REV_1.WAV file did also indeed freeze up the player, requiring a reset but the L_REV_2.WAV file did not.

Interestingly, remember how this file showed in WMP as being over 4 minutes long? Well, on my Clip it showed the correct time (17 secs.) but what was strange was that the progress bar did not move as it normally does when advancing through a song.

This behavior occurred with the files being played from both the internal memory and card. I believe I mentioned I’ve checked several other WAV files and they seem to play without incident on the Clip+. I’m not sure where you got these files, or from what program they were ripped through, but it looks like this is where the problem is, not with the Clip+ player. The fault lies with the files themselves. I would re-download the files and not try to split or otherwise change them, and/or try a different ripping program.

@tapeworm wrote:

 

However, even as this error message was displaying, the L_REV_2.WAV file would play; and the voice came out of the left speaker. Funny thing though, the time listed for the file (in WMP) was over 4 minutes and in actuality it is only like 17 seconds long (if I’m remembering correctly). The L_REV_1.WAV file wouldn’t play at all.

 

The file is truncated, so the header indicates its much larger.  A lot of software will ignore this (since the length of a WAV file is trivially calculated from the sample rate, bitdepth and file size) so its not usually a problem.  

The real problem is probably that the file has a lot of metadata in the header in various info chunks.  These are not widely supported, so the Sandisk firmware may not expect them.  By chance the metadata in the header of the first file extends the header so that its length is divisible by 2, but not divisiable by 4.  A PCM sample is 2 bytes in this file, and 2 are put together to make a 4 byte stereo pair.  Since the left channel starts shifted over by 2 bytes, the very first sample is lost and all subsequent ones are swapped (the first left sample is skipped, first right becomes the first left sample, second left becomes first right, …).

Theres basically two solutions here:

  1. Remove all these weird headers from your WAV files, or at least make sure that each WAV file has an amount of metadata added thats divisible by 4 bytes.  I don’t have my clip handy, but I bet if you just insert two bytes starting at byte 250 in that file it will play correctly in the sandisk software.  

  2. Use rockbox, which understands metadata in WAV files, and thus will not be confused by it.  I’ve verified that our WAV parser correctly handles the example file and does not flip the channels.  Likewise VLC does the same (and also helpfully prints out the file tags).    

    I didn’t touch the headers. They are not weird. These are the headers produced by well known, reputable CD ripping programs that thousands of other people use. Which means, for one thing, that there are thousands of files ripped by thousands of people out there with the same exact headers, and all those files will play with the channels reversed.
    Now, I’d like to address the contention that the headers are not widely supported, and Sandisk firmware does not expect them. Let’s take a very, very old version of, say, Windows Media Player. Clearly, that old version will know nothing about these modern headers. My question is, does this mean that that old version of Windows Media Player will play the files with the channels reversed? I didn’t do such testing, and I don’t know the answer. However, if the answer is no, you’ll have to admit that this is a Sansa firmware bug after all.

xcvbnm wrote:

 Which means, for one thing, that there are thousands of files ripped by thousands of people out there with the same exact headers, and all those files will play with the channels reversed.

 

 

 

Yes, but no one uses WAV files for actual playback, so you’re probably the first to notice.  And probably only half of them would on average be reversed, since the number of samples lost at the beginning is random, half of people would get an even number lost and thus not flip the channels.  

 

 

xcvbnm wrote:
    Now, I’d like to address the contention that the headers are not widely supported, and Sandisk firmware does not expect them. Let’s take a very, very old version of, say, Windows Media Player. Clearly, that old version will know nothing about these modern headers. My question is, does this mean that that old version of Windows Media Player will play the files with the channels reversed? I didn’t do such testing, and I don’t know the answer.

INFO chunks in WAV files are much older then WMP, so I suspect all versions will support it.  The problem with them is that they’re just not very widely supported, so they’re not a great idea to use.  If you need to tag files, you should be using FLAC, which has much more widely supported file tags.

 xcvbnm wrote:

However, if the answer is no, you’ll have to admit that this is a Sansa firmware bug after all.

As I said above, this is a bug in the Sandisk firmware.  

i wouldn’t  describe the lack of a feature as being a bug, unless the specifications for the device lists that feature.

The bug is that they (probably) don’t check to see if the first sample really is word aligned, and so flip the channels if its not (because of tag or any other reason).