rememberAudio

Decode audio from the given bytes on the provided RiveWorker. The decoded audio can only be used on the same RiveWorker it was created on.

This function is intended for use with audio that may want to be registered multiple times with AudioAsset.register. If you want to decode and register in one step, use rememberRegisteredAudio instead.

The audio will be deleted and its RiveWorker reference released when the composable leaves the composition.

Return

The Result of the audio decoding, which can be either loading, error, or success with the AudioHandle.

Parameters

riveWorker

The Rive worker that owns and performs operations on this audio.

bytes

The byte array containing the audio data to decode.