Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够使用 32 位浮点样本编写 PCM wav 文件。这似乎是一种有效的格式,因为 libsndfile 声称支持它。
但是,如果我在标题中指定 32 位的样本大小,我打开它的任何程序都假定它是 32 位整数数据。需要在 wav 文件头中设置哪些标志等来指定浮点数据?
谁能指出一些解释如何执行此操作的文档?
您需要将“fmt”块中的 wFormat 标记设置为 WAVE_FORMAT_IEEE_FLOAT (3)。
WAVE 格式规范的一个很好的来源是这个页面。