Skip to content

AudioSettingsManager ​

Inherits: RefCounted

AudioSettingsManager handles audio-related functionality in the game. It manages volume controls for different audio buses and emits signals for audio events.

Methods ​

voidapply_settings( settings: SettingsConfig )
voidrestore_defaults( settings: SettingsConfig )
floatget_master_volume( settings: SettingsConfig )
voidset_master_volume( settings: SettingsConfig, value: float )
floatget_music_volume( settings: SettingsConfig )
voidset_music_volume( settings: SettingsConfig, value: float )
floatget_sfx_volume( settings: SettingsConfig )
voidset_sfx_volume( settings: SettingsConfig, value: float )
floatget_ambience_volume( settings: SettingsConfig )
voidset_ambience_volume( settings: SettingsConfig, value: float )
floatget_voice_volume( settings: SettingsConfig )
voidset_voice_volume( settings: SettingsConfig, value: float )
floatget_ui_volume( settings: SettingsConfig )
voidset_ui_volume( settings: SettingsConfig, value: float )

Signals ​

master_volume_changed( newVolume: float ) ​

Signal, emitted when the master volume has changed

music_volume_changed( newVolume: float ) ​

Signal, emitted when the music volume has changed

sfx_volume_changed( newVolume: float ) ​

Signal, emitted when the sound effects volume has changed

ambience_volume_changed( newVolume: float ) ​

Signal, emitted when the ambience volume has changed

voice_volume_changed( newVolume: float ) ​

Signal, emitted when the sound effects volume has changed

ui_volume_changed( newVolume: float ) ​

Signal, emitted when the ambience volume has changed

Constants ​

  • const MASTER_VOLUME_LABEL = "Master" - Label for master volume
  • const MUSIC_VOLUME_LABEL = "Music" - Label for music volume
  • const SFX_VOLUME_LABEL = "SFX" - Label for sound effects volume
  • const AMBIENCE_VOLUME_LABEL = "Ambience" - Label for ambience volume
  • const VOICE_VOLUME_LABEL = "Voice" - Label for voice volume
  • const UI_VOLUME_LABEL = "UI" - Label for voice volume

Method descriptions ​

void apply_settings( settings: SettingsConfig ) ​

Applies settings to the audio system

void restore_defaults( settings: SettingsConfig ) ​

Restore default audio settings

float get_master_volume( settings: SettingsConfig ) ​

Gets the master volume

void set_master_volume( settings: SettingsConfig, value: float ) ​

Sets the master volume

float get_music_volume( settings: SettingsConfig ) ​

Gets the music volume

void set_music_volume( settings: SettingsConfig, value: float ) ​

Sets the music volume

float get_sfx_volume( settings: SettingsConfig ) ​

Gets the SFX volume

void set_sfx_volume( settings: SettingsConfig, value: float ) ​

Sets the SFX volume

float get_ambience_volume( settings: SettingsConfig ) ​

Gets the ambience volume

void set_ambience_volume( settings: SettingsConfig, value: float ) ​

Sets the ambience volume

float get_voice_volume( settings: SettingsConfig ) ​

Gets the SFX volume

void set_voice_volume( settings: SettingsConfig, value: float ) ​

Sets the SFX volume

float get_ui_volume( settings: SettingsConfig ) ​

Gets the ambience volume

void set_ui_volume( settings: SettingsConfig, value: float ) ​

Sets the ui volume