aboutsummaryrefslogtreecommitdiff
path: root/client/audio
diff options
context:
space:
mode:
Diffstat (limited to 'client/audio')
-rw-r--r--client/audio/sound.gd8
-rw-r--r--client/audio/sound.tscn4
2 files changed, 8 insertions, 4 deletions
diff --git a/client/audio/sound.gd b/client/audio/sound.gd
index af23f0cd..90f1ef1e 100644
--- a/client/audio/sound.gd
+++ b/client/audio/sound.gd
@@ -34,13 +34,13 @@ func play_music(music : String): # If music == "stop", this stops all music
else:
music_node.get_node(music).play()
-func set_volume(value:float):
- AudioServer.set_bus_volume_db(0, value)
+func set_volume(bus : int, value:float):
+ AudioServer.set_bus_volume_db(bus, value)
if value == -30:
- AudioServer.set_bus_mute(0, true)
+ AudioServer.set_bus_mute(bus, true)
else:
- AudioServer.set_bus_mute(0, false)
+ AudioServer.set_bus_mute(bus, false)
func play_click():
click_sound.play()
diff --git a/client/audio/sound.tscn b/client/audio/sound.tscn
index f80a1927..5fd759ce 100644
--- a/client/audio/sound.tscn
+++ b/client/audio/sound.tscn
@@ -11,14 +11,18 @@ script = ExtResource("1_b0qb1")
[node name="Click" type="AudioStreamPlayer" parent="UI"]
stream = ExtResource("2_mhrce")
+bus = &"SFX"
[node name="Hover" type="AudioStreamPlayer" parent="UI"]
stream = ExtResource("3_qft2s")
+bus = &"SFX"
[node name="Music" type="Node" parent="."]
[node name="MainMenu" type="AudioStreamPlayer" parent="Music"]
volume_db = 1.0
+bus = &"Music"
[node name="Lobby" type="AudioStreamPlayer" parent="Music"]
volume_db = -3.5
+bus = &"Music"