waverly 0.2.0

Parse and write WAV files
Documentation
  • Coverage
  • 19.23%
    10 out of 52 items documented0 out of 12 items with examples
  • Size
  • Source code size: 14.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.87 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • dulltools/waverly
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aef-

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