Skip to main content

read_wav_from_bytes

Function read_wav_from_bytes 

Source
pub fn read_wav_from_bytes(bytes: &[u8]) -> Result<Wav, WavError>
Expand description

Reads WAV data from bytes.

§Errors

WavError::InvalidHeader when bytes are not a RIFF/WAVE container, and WavError::InvalidChunk when a chunk’s declared length runs past the end or a required chunk is absent.

The engine’s SFX prefix is optional on read: a file carrying one and a file without both read, since the engine does not require it either.