Skip to main content

Crate pure_wav

Crate pure_wav 

Source
Expand description

§Usage

Create a Parser with Parser::default. Call Parser::read_instruction to get where in the file you need to read. Read the file. Call Parser::process_data with the data you read. In the end you will get meta data about the format of the samples and the location of teh samples themselves.

§Handling untrusted data

This library may ask you to read data outside of the range of the file / whatever is storing the WAVE. The meta data might point to a range outside of the file. It’s your responsibility to validate those ranges if you want to.

§The WAVE format

See

Basically, a WAVE file is formatted with RIFF. There is a fmt chunk that contains information such as the number of channels and bits per sample. There is a data chunk that contains the actual audio samples. There can also be other chunks to describe things like the artist and title of the song, but they are not needed for simply playing audio.

Re-exports§

pub use pure_riff;
pub use zerocopy;

Structs§

FmtData
Parser
ReadInstruction
WavMetaData

Enums§

Error
ProcessDataOutput