tags:

views:

393

answers:

1

I would like to be able to write PCM wav files with 32-bit floating point samples. This seems to be a valid format since libsndfile claims to support it.

However, if I specify in my header a sample size of 32-bits, any program I open it in assumes that it's 32-bit integer data. What flags, etc need to be set in the wav file header to specify floating point data?

Can anyone point me to some documentation that explains how to do this?

+2  A: 

You need to set the wFormat tag in the 'fmt' chunk to WAVE_FORMAT_IEEE_FLOAT (3).

A good source for the WAVE format specification is this page.

Han