Valid 16-bit PCM wave file not loading
skratchdot opened this issue · 1 comments
skratchdot commented
A wave file with the following info was not loading:
Format : PCM
Sample Rate : 44100
Bits Per Sample : 16
Channels : 2
After re-saving with Audacity (in same format), the file will import.
skratchdot commented
Turns out this was due to the way I was parsing RIFF wave files.
Per the specs I've read, PCM "fmt " chunks are not supposed to have "Extra Format Bytes" (see http://www.sonicspot.com/guide/wavefiles.html).
I was expecting a 16 byte chunk, but this file had an 18 byte chunk.
Turns out I was reading the spec wrong (or not all programs respect the PCM clause- and include extra bytes).