Import with #import "std/audio_wav".

WavDecode :: (input: []u8, max_frames: s64, output: *PCM) -> s32

RIFF WAVE mono/stereo: PCM16, IEEE float32, IMA ADPCM and MS ADPCM. Unknown chunks skip with padding; duplicate fmt/data and RF64 reject.

WavEncode :: (pcm: *PCM, output: *Vec(u8)) -> s32

PCM16 output clips finite sinc/codec overshoots at the integer boundary.

Source ↗ · All modules