Hello, I am working on my first application for the panda II and I’ve run into a program issue that I need some help working out. My program is modified from the fez audio out example project ( GHI Electronics – Where Hardware Meets Software ). The original program worked on my board, and my new .cs seems to work, but when I debug with the new .wav files it returns the error message : “unexpected data subchunk.”
Specifically, the problem is in the wave.cs:
//// data sub-chunk ///////////////////////////////////////
if (wav[index + 0] != ‘d’ || wav[index + 1] != ‘a’ || wav[index + 2] != ‘t’ ||
wav[index + 3] != ‘a’)
{
throw new Exception(“Unexpected data subchunk!”);
}
index += 4;
uint Subchunk2Size = (ushort)Utility.ExtractValueFromArray(wav, index, 4);
index += 4;
dataSize = (int)Subchunk2Size;
////////////////////////////////////////////
From what I can tell there must be something wrong with my sound files but I don’t understand c# well enough to see what it is.
Thank you, any help is much appreciated,
Mike