sound.wav.decode

sound.wav

decode(data, opts) -> buf, info/err

Decode WAV bytes into a sample buffer

Returns the buffer and { channels, rate, bits, frames }. opts.rate resamples the buffer to that rate; pass dev:rate() so the asset plays at its pitch. Returns nil and an error on failure.