No matching definitions.

raylib/audio

src/raylib/audio.tur
defn

init-audio-device

(init-audio-device :void)

initialize the audio device and context.

(init-audio-device)

Since: P3

defn

close-audio-device

(close-audio-device :void)

close the audio device and release resources.

(close-audio-device)

Since: P3

defn

load-sound

(load-sound [path :cstr] :int)

load a sound effect from file into memory.

pathfilesystem path to an audio file (WAV, OGG, MP3, FLAC, ...)

Opaque :int handle to a heap-allocated Sound struct.

(let [s (load-sound "explosion.wav")] ...)

Since: P3

defn

unload-sound

(unload-sound [sound :int] :void)

free a sound from memory.

soundSound handle from load-sound
(unload-sound s)

Since: P3

defn

play-sound

(play-sound [sound :int] :void)

play a sound effect from the beginning.

soundSound handle
(play-sound explosion)

Since: P3

defn

load-music-stream

(load-music-stream [path :cstr] :int)

load a music file for streaming playback.

pathfilesystem path to an audio file

Opaque :int handle to a heap-allocated Music struct.

(let [bgm (load-music-stream "theme.ogg")] ...)

Since: P3

defn

unload-music-stream

(unload-music-stream [music :int] :void)

free a music stream from memory.

musicMusic handle from load-music-stream
(unload-music-stream bgm)

Since: P3

defn

play-music-stream

(play-music-stream [music :int] :void)

start or resume streaming playback of a music file.

musicMusic handle
(play-music-stream bgm)

Since: P3

defn

update-music-stream

(update-music-stream [music :int] :void)

refill the audio stream buffer; call once per frame.

musicMusic handle
(update-music-stream bgm)  ; inside the game loop

Since: P3