//clika-runtime/io.clika.runtime/Io/encodeAudio
encodeAudio
[common]
fun encodeAudio(samples: Tensor, sampleRate: Int): ByteArray
Encode a waveform as a 16-bit PCM WAV payload. samples is [frames] (mono) or [frames, channels] interleaved: a float tensor holds values in -1, 1 (a value outside clips), an Int16 tensor is written as is. sampleRate is in Hz. loadAudio reads the payload back with the same layout.