Skip to main content

Module wav

Module wav 

Source
Expand description

Reading and writing RIFF/WAVE audio files.

See the book entry Audio files.

Structs§

WavAudio
Decoded audio: interleaved samples normalised to [-1, 1) (integer formats) or as stored (float).

Enums§

WavSampleFormat
Sample encodings that can be written (and are understood when reading).

Functions§

encode_wav
Serialises audio as a canonical WAV file in the requested sample format. Samples outside [-1, 1) are clipped for the integer formats (scale is 2^(bits-1)).
parse_wav
Parses a WAV byte stream (PCM 8/16/24/32-bit, IEEE float 32/64-bit, plain or extensible headers).
read_wav_file
Reads a WAV file from disk.
write_wav_file
Writes a WAV file to disk.