waverly

Crates.iowaverly
lib.rswaverly
version0.2.0
sourcesrc
created_at2022-02-27 20:33:02.559369
updated_at2022-03-18 01:45:09.905344
descriptionParse and write WAV files
homepage
repositoryhttps://github.com/fraihaav/waverly/
max_upload_size
id540493
size12,766
Adrian Fraiha (aef-)

documentation

README

waverly

Waverly is a Rust library that allows for easy parsing and writing of WAV files with the primary goal of providing access to all metadata within a WAV file, not just the format and data chunks. It's secondary goal is to support no_std. If you only care about the data chunk already formatted as samples, there are plenty of good alternatives.

use std::fs::File;
use std::io::Cursor;
use waverly::Wave;

fn main() -> Result<(), waverly::WaverlyError> {
    let file = File::open("./meta/16bit-2ch-float-peak.wav")?;
    let wave: Wave = Wave::from_reader(file)?;

    let mut virt_file = Cursor::new(Vec::new());
    wave.write(&mut virt_file)?;
    Ok(())
}

TODO

  • Parse/read and write WAV files

  • FORMAT chunk

  • DATA chunk

  • PEAK chunk

  • FACT chunk

  • no_std support

  • Single pass generation of samples in any bit depth

  • Most metadata in WAV can be generated without user input, do so where possible on write.

  • Feature to skip or target chunks

  • CUE POINT chunk

  • PLAYLIST chunk

  • Support PEAK chunk when channels are not equal to 2

  • Better support for extensible modes

  • Better error messages when binary doesn't align with chunks

  • ATests for additional chunks, extensible modes, no_std

Further reading

Multimedia Programming Interface and Data Specifications, starting on page 56

Commit count: 8

cargo fmt