2 unstable releases
Uses old Rust 2015
0.2.0 | Mar 30, 2016 |
---|---|
0.1.0 | Mar 17, 2016 |
#13 in #ieee
18KB
418 lines
Wavefile
Overview
Wavefile is a simple crate for parsing WAV files. It should theoretically handle any of the following:
- PCM data (most common)
- IEEE Float
- Extensible WAV files with PCM/IEEE Float data.
However, it's hard to find samples of some of these format so any feedback is appreciated :)
Basic Example
let wav = match WaveFile::open("/home/john/test.wav") {
Ok(w) => w,
Err(e) => println!("Oh no: {}", e)
};
println!("{} Hz, {} channel(s), {} total samples", w.sample_rate(), w.channels(), w.len());
for frame in w.iter() {
// here frame is a Vec<i32> containing one value per channel in the file.
println!("{:?}", frame);
}
Dependencies
~250–365KB