You will need to convert the amplitude from the range 0 - 1, to 0 to 127
or -1 to -128 for a negative amplitude. You would probably want to
round the floating point value by adding 0.5 before assigning to signed
char. This is assuming you want a 8 bit signed values WAV file. That
can't actually be done but 8 bit unsigned is allowed. There is a lot of
quirks with WAV files which you would find from trying to use them.
Fraser.
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from
http://www.SecureIX.com ***