decode

fun decode(chunk: ByteArray, format: AudioFormat): Array<BigDecimal>

Decodes raw PCM bytes to normalized samples in -1.0, 1.0.

For interleaved multi-channel input, this returns a flat stream (L R L R ...). If you need per-channel arrays, split by channels.count.

For planar (non-interleaved), call this per plane.