extends HSlider

func _ready():
	var sounds = AudioServer.get_bus_index("Sounds")
	value = AudioServer.get_bus_volume_db(sounds)

func _on_SoundSlider_value_changed(value):
	if value <= -30:
		value = -80
	AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Sounds"), value)
	if $SoundTimer.is_stopped():
		Audio.play_sound("Kalimba")
		$SoundTimer.start()
