Skip to content

ledbettj/wavefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wavefile

Build Status Crates.io Status License

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);
}

About

Rust wavefile parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages