AudioByte

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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 class AudioByte : AudioByteBuilder

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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 class AudioByte : AudioByteBuilder

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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 class AudioByte : AudioByteBuilder

Deprecated

AudioByte greedily eats up memory. Switch to the newer channel-based implementation, SoundBoard(context = Any?).

Replace with

SoundBoard(context = null)

Play audio from a local file path or a Compose Resource (String).

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

Constructors

Link copied to clipboard
actual constructor()
actual constructor()
expect constructor()
actual constructor()
actual constructor()
actual constructor()

Functions

Link copied to clipboard
actual open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

actual open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

expect open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

actual open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

actual open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

actual open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

Link copied to clipboard
actual open override fun play(item: Any)

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

actual open override fun play(item: Any)

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

expect open override fun play(item: Any)

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

actual open override fun play(item: Any)

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

actual open override fun play(item: Any)

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

actual open override fun play(item: Any)

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

Link copied to clipboard
actual open override fun release()

Used when done to clear the AudioByte object from memory.

actual open override fun release()

Used when done to clear the AudioByte object from memory.

expect open override fun release()

Used when done to clear the AudioByte object from memory.

actual open override fun release()

Used when done to clear the AudioByte object from memory.

actual open override fun release()

Used when done to clear the AudioByte object from memory.

actual open override fun release()

Used when done to clear the AudioByte object from memory.