File with 40-byte fmt chunk and PCM format tag fails to load
ruuda opened this issue · comments
This issue was originally reported at RustAudio/rodio#139.
The file in the reported there contains a 40-byte fmt chunk, which is typically the case when the format tag is EXTENSIBLE
, but in this case it occurs for a PCM
format tag. It is not an incorrectly specified WAVEFORMATEXTENSIBLE
struct, because the cbSize
field is 0 like in a WAVEFORMATEX
struct, not the expected 22. When the fmt chunk is treated as a WAVEFORMATEX
struct (ignoring the additional bytes), the wBitsPerSample
field is 24, which is invalid according to the spec.
The file appears to be a nonstandard, but every player I tried plays it nonetheless. Support for opening this file could be added without breaking existing support.
Fixed in 66ea189. I will release a new version to crates.io in the next few days.
Hound 3.2.0, which includes the fix, is now on crates.io.