ruuda / hound

A wav encoding and decoding library in Rust
https://codeberg.org/ruuda/hound
Apache License 2.0
489 stars 65 forks source link

Work around for 0 valid bits #51

Closed Cocalus closed 3 years ago

Cocalus commented 3 years ago

Here's an example file and what I think the fix is for #50. I zeroed the valid bits in a hexeditor on waveformatextensible-32bit-48kHz-stereo.wav to create the example. It fails the same way in my code as the example I found in the wild. It may need to get added to more tests.

ruuda commented 3 years ago

Thanks for opening a pull request!

It may need to get added to more tests.

Yeah, could you also add a test to specifically test that the reported bits per sample is as expected? It could be similar to this one:

https://github.com/ruuda/hound/blob/fa88d577f08370e915a5bb3af6b772de68c53e20/src/read.rs#L966-L983

Cocalus commented 3 years ago

I've added the requested test.

ruuda commented 3 years ago

Thanks!