Audio

object Audio

Represents the Audio controller by raylib, which is used to manage audio devices and settings.

Properties

Link copied to clipboard

The master volume of the audio device, which can be set between 0.0 and 1.0.

Link copied to clipboard

Whether the audio device is ready to be used.

Functions

Link copied to clipboard
fun pause(playable: Playable)

Pauses a playable audio format, which can be a Sound, MusicStream, or AudioStream. If the audio is not playing, this function does nothing. After calling this function, the audio will be paused at its current position and can be resumed with resume.

Link copied to clipboard
fun play(playable: Playable)

Plays a playable audio format, which can be a Sound, MusicStream, or AudioStream. If the audio is already playing, it will be restarted from the beginning.

Link copied to clipboard
fun resume(playable: Playable)

Resumes a playable audio format, which can be a Sound, MusicStream, or AudioStream. If the audio is not paused, this function does nothing. After calling this function, the audio will continue playing from its current position.

Link copied to clipboard
fun start(): ERROR CLASS: Unresolved name: InitAudioDevice

Initializes the audio device.

Link copied to clipboard
fun stop(): ERROR CLASS: Unresolved name: CloseAudioDevice

Stops the audio device.

fun stop(playable: Playable)

Stops a playable audio format, which can be a Sound, MusicStream, or AudioStream. If the audio is not playing, this function does nothing. After calling this function, the audio will be reset to the beginning and can be played again with play.