View Source Rayex.Audio (Rayex v0.0.3)
Audio related functions
Summary
Functions
Initialize audio device and context
Check if audio device has been initialized successfully
Checks if a sound is ready
Load sound from file
Play a sound
Set master volume (listener)
Stop a sound
Functions
@spec init_audio_device() :: :ok
Initialize audio device and context
@spec is_audio_device_ready?() :: boolean()
Check if audio device has been initialized successfully
@spec is_sound_ready?(Rayex.Structs.Sound.t()) :: boolean()
Checks if a sound is ready
@spec load_sound(String.t()) :: Rayex.Structs.Sound.t()
Load sound from file
@spec play_sound(Rayex.Structs.Sound.t()) :: :ok
Play a sound
@spec set_master_volume(float()) :: :ok
Set master volume (listener)
@spec stop_sound(Rayex.Structs.Sound.t()) :: :ok
Stop a sound