gpt4 book ai didi

audio - RIFF WAV文件中的格式参数的字节序是否得到保证?

转载 作者:行者123 更新时间:2023-12-03 21:18:14 33 4
gpt4 key购买 nike

RIFF WAV文件中的格式参数的字节序是否得到保证?我对此有heard conflicting answers,包括对RIFX文件格式的引用。

最佳答案

是的。

如果文件以RIFF开头,则为小端。
如果以FFIR或RIFX开头,则可能不是。
通常,支持WAV格式意味着支持RIFF文件,尽管添加RIFX支持并不困难。

BWF(广播波格式)的AES31规范引用了RIFF的该规范:http://www.tactilemedia.com/info/MCI_Control_Info.html

由此:

RIFF has a counterpart, RIFX, that is used to define RIFF file formats that use the Motorola integer byte-ordering format rather than the Intel format. A RIFX file is the same as a RIFF file, except that the first four bytes are 'RIFX' instead of 'RIFF', and integer byte ordering is represented in Motorola format.



您引用的KVR文章指的是作者在big-endian系统(Motorola PPC)上对int *的错误使用,这将检索字节交换的值。编写跨字节代码时,始终必须谨慎处理正确的字节交换。

如果磁盘上文件的第0个字节为'R',第3个字节为'F',则可以确定其余内容将以小尾数形式存储。

RIFX没有被广泛使用。大多数大端RIFF实现将字节交换到磁盘,并生成正确的RIFF文件。

关于audio - RIFF WAV文件中的格式参数的字节序是否得到保证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1111539/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com