sound.from_pcm

sound

from_pcm(data, channels, fmt) -> buf, err

Decode raw PCM bytes into a sample buffer

data is interleaved little-endian PCM. fmt is "u8", "s16", "s24", "s32" or "f32". Returns nil and an error on failure.