ruuda / hound

A wav encoding and decoding library in Rust

Home Page:https://codeberg.org/ruuda/hound

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hound errors out when trying to read samples from this file

MathieuDuponchelle opened this issue · comments

When trying to use hound from my application in such a way:

let data: Vec<u8> = wav_file_received_over_the_network;
let reader = match hound::WavReader::new(&data[..])

Hound fails with:

Ill-formed WAVE file: data chunk length is not a multiple of sample size

When dumping that data to file and attempting to use the rms example on it, hound fails in a similar way:

thread 'main' panicked at examples/rms.rs:31:34:
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: "Failed to read enough bytes." })

The file plays back just fine with vlc, you can download it here: <www.mathieudu.com/misc/tmp.wav>

related to #63 I assume