Skip to content

ledbettj/wavefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
John Ledbetter
May 24, 2017
69d10ff · May 24, 2017

History

38 Commits
May 19, 2017
Mar 30, 2016
May 24, 2017
Mar 9, 2016
Mar 30, 2016
Apr 3, 2017
Mar 17, 2016
Mar 30, 2016

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