play

actual open override fun play(item: Any)
actual open fun play(item: Any)
expect open override fun play(item: Any)

Play a loaded sound immediately, without regard for how many times it's already played

Parameters

item

provide the result of the load function called previously

Example:

val audioByte: AudioByte = AudioByte() // Create an AudioByte instance
val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory
audioByte.play(clickSound) // Call it whenever you like as needed
actual open override fun play(item: Any)
actual open override fun play(item: Any)
actual open override fun play(item: Any)