Invalid wave file - No fmt chunk found

Jul 18, 2011 at 11:06 AM

I try to use WaveFileWriter in way that every buffer I got i write to file. like this:

writer.write(, 0,;

I the folder I see file with the correct size.

when I try to open it I got this exception.

What I did wrong?

Jul 19, 2011 at 12:53 AM

You need to define the format of the file so that it can be written out at the beginning.
Please review this tutorial:


Jul 19, 2011 at 7:57 AM
Edited Jul 19, 2011 at 8:22 AM

Sebastian I know. this what I did:

writer = new WaveFileWriter(fileName, format);

void OnReceiveData()
    writer.Write(, 0,
    buffer = null;
Jul 19, 2011 at 8:12 AM

did you dispose the WaveFileWriter? This is very important as it writes some offsets into the WAV file header.

Jul 19, 2011 at 8:20 AM

Thanks Mark!

Its work now.