class

PointClickEngine::Audio::SoundEffectManager

Inherits Reference < Object

Manages sound effects loading, caching, and playback

Instance methods

cleanup

Explicit cleanup method - caller is responsible for calling this Do NOT use finalizer as it causes GC deadlocks with Raylib

Source
clear_cache

Clear all cached sound effects

Source
get_sound(name : String) : SoundEffect | Nil

Get a sound effect by name

Source
has_sound?(name : String) : Bool

Check if a sound is loaded

Source
load_sound(name : String, file_path : String) : SoundEffect

Load a sound effect from file and cache it

Source
play_sound(name : String, volume : Float32 = 1.0) : Nil

Play a sound effect by name

Source
play_sound_at(name : String, position : RL::Vector2, listener_pos : RL::Vector2, max_distance : Float32 = 500.0) : Nil

Play a sound effect at a specific position (3D audio)

Source
preload_sounds(sound_files : Array(Tuple(String, String))) : Nil

Preload multiple sound effects

Source
sfx_volume

Global sound effects volume multiplier

Source
sfx_volume=(sfx_volume : Float32)

Global sound effects volume multiplier

Source
sound_effects

Cache of loaded sound effects

Source
stop_sound(name : String) : Nil

Stop a specific sound effect

Source
unload_sound(name : String) : Nil

Unload a specific sound effect

Source
update_volume(volume : Float32) : Nil

Update volume for all loaded sounds

Source