开发者

How to write wav file with 32-bit float data?

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 anyon开发者_如何学Goe point me to some documentation that explains how to do this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜