decodeAudio

suspend fun decodeAudio(bytes: ByteArray): AudioHandle

Decode an audio file from the given bytes. The decoded audio is stored on the CommandServer.

Audio may be used to supply a referenced asset in a Rive file with registerAudio.

Return

A handle to the decoded audio.

Parameters

bytes

The bytes of the audio file to decode.

Throws

If the audio could not be decoded, e.g. if the bytes are not a valid audio file.

If the CommandQueue has been released.

If the coroutine is cancelled before the operation completes.