encode

abstract fun encode(samples: Array<Short>): Array<Byte>

Encodes the given audio samples into a compressed format represented as an array of bytes.

Return

An array of bytes containing the encoded audio data.

Parameters

samples

The audio samples to encode.

Throws

If there's an error during the encoding process.