wav

Crates.iowav
lib.rswav
version1.0.1
sourcesrc
created_at2020-01-09 00:26:29.484777
updated_at2024-05-18 18:05:47.737921
descriptionThis project is no longer maintained (and wasn't a very well implemented project to begin with), use `hound` instead
homepage
repository
max_upload_size
id196759
size1,188,800
Fluhzar (Fluhzar)

documentation

README

WAV

⚠️ THIS PROJECT IS NO LONGER MAINTAINED, USE hound INSTEAD ⚠️

This is a crate for reading in and writing out wave files. It supports uncompressed PCM bit depths of 8, 16, 24 bits, and 32bit IEEE Float formats, both with any number of channels. Unfortunately other types of data format (e.g. compressed WAVE files) are not supported. There is also no support for any metadata chunks or any chunks other than the "fmt " and "data" chunks.

Example

use std::fs::File;
use std::path::Path;

let mut inp_file = File::open(Path::new("data/sine.wav"))?;
let (header, data) = wav::read(&mut inp_file)?;

let mut out_file = File::create(Path::new("data/output.wav"))?;
wav::write(header, &data, &mut out_file)?;
Commit count: 0

cargo fmt