View Single Post
  #20 (permalink)  
Old 09-25-2007, 07:57 PM
Vladimir Vassilevsky
Guest
 
Posts: n/a
Default Re: 32 bit integer WAV file writer?



Stefan Reuther wrote:

>>>Vladimir Vassilevsky wrote:
>>>>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

>
> [...]
>
>>I have done it that way ~20 years ago. Surprisingly, it works just fine.

>
>
> For a sufficiently small definition of "works just fine". WAV files have
> size markers at several places, and your method will only work for
> sufficiently simple^Wstupid WAV readers (for example those that simply
> do a seek(44) and read until EOF).
>
> Actually, Windows Media Player refuses to open WAV files I wrote
> although I think I conform to the specs. Didn't get around debugging
> that, though: I use them for temporary storage only, and Audacity, Sound
> Recorder and sox read them just fine :-)


It worked fine with the WMP and WinAmp too (although I would not bet
about the latest versions). However you need to make sure that your file
is not shorter then the original; it is OK if the file is longer.

VLV


Reply With Quote