Supported WAV file formats?

I’m trying to use the PlaySoundFile() function and have not had any luck. I am able to get some sound, but it is always completely garbled (either a high-pitched whine, or random clicking). I’ve tried a variety of sample files from this site as well as a few others to no avail.

I’m running current ROBOTC and have current firmware installed on the Cortex. PlaySound() and PlayTone() do produce good quality sound, so I know my use of the SP port is correct.

Is PlaySoundFile() expected to work, or is it known to be broken?
Is there a specific encoding of WAV files that does work?

Thanks,

  • Dean

I’ve gotten it to work by choosing simpler WAV file encodings.

So far, I’ve had luck with 8KHz Mono samples, either Linear-PCM or µ-Law encoded. I’d still love to see a list of supported formats.

Even better, the File Manager window could either transcode to a supported encoding, or at least warn if an incompatible encoding is being downloaded. It has a checkbox to normalize the sample volume, so it appears to already be modifying the WAV data on the way down to the Cortex.

Thanks,

  • Dean

Hi Dean,

Thanks for the feedback, and I’m glad you got it working. To answer your initial question… only certain types of WAV files will be supported – i.e. monophonic with PCM uncompressed encoding (and perhaps ADPCM compression as well).