[SOLVED]Problem Setting Volume Of Music: music_player.set_volume_db(MusicVolume) # Not working ?
We are trying to modify the volume of music playing in an AudioStreamPlayer.
Please look at below script code.
Music volume is set to 0.0 but the music is still playing in the game?
Any help would be appreciate, thanks!
# "AudioCore.gd" extends Node var MusicVolume var EffectsVolume func _ready(): MusicVolume = 0.0 EffectsVolume = 1.0 var music_player = AudioStreamPlayer.new() music_player.stream = load("res://media/music/TitleBGM.ogg") add_child(music_player) music_player.set_volume_db(MusicVolume) # Not working ? music_player.play() pass func _process(delta): pass