Greg Berchin wrote:
>>You don't need all that junk. The wave file header structure is trivial; it
>>is all explained in MSDN.
>
>
> Well, at least, it CAN be trivial -- 44 bytes, if I remember
> correctly; specifying sampling rate, number of channels, bytes per
> sample, number of bytes in entire file, maybe one or two other fields
> that don't come to mind right now ... all in human-readable form. It
> can also be horrendously complex, if you choose to make it such. It
> is a Microsoft standard, after all.
There is also the wave format specifier, there can be many wave chunks
with the different parameters in one file, etc. etc. hell knows who and
why needs all of that.
Here is the utterly lazy method for writing WAVs:
1. Create a wav with the required parameters in the standard Windows
Sound Recorder.
2. Cut the header off. If you don't want to know what is the size of the
header, ~100 bytes from the beginning of the file will do.
3. Attach that header to your file
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com