Struct wavefile::WaveFile [] [src]

pub struct WaveFile { /* fields omitted */ }

Methods

impl WaveFile
[src]

Constructs a new WaveFile.

Example

use wavefile::{WaveFile,WaveError};

match WaveFile::open("./fixtures/test-s24le.wav") {
  Ok(f)  => f,
  Err(e) => panic!("Couldn't open example file: {}", e)
};

The number of audio channels in the file.

The number of samples present for one second of audio.

The total number of frames present in the file. Each frame will contain channels() number of samples.

Returns a copy of the WaveInfo for this file, parsed from the file header.

Returns an iterator which yields each individual Frame successively until it reaches the end of the file.

Example

use wavefile::WaveFile;

let wav = WaveFile::open("./fixtures/test-s24le.wav").unwrap();

for frame in wav.iter() {
  println!("{:?}", frame);
}