1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Use StringName consistently to refer to the Master audio bus name

This commit is contained in:
Hugo Locurcio
2023-08-07 17:33:07 +02:00
parent f2acfb1ffc
commit 49b6067aba
12 changed files with 26 additions and 16 deletions

View File

@@ -40,6 +40,7 @@
#include "core/string/string_name.h"
#include "core/templates/pair.h"
#include "scene/resources/audio_stream_wav.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio/effects/audio_effect_compressor.h"
@@ -747,7 +748,7 @@ void AudioServer::set_bus_count(int p_count) {
buses[i]->bypass = false;
buses[i]->volume_db = 0;
if (i > 0) {
buses[i]->send = "Master";
buses[i]->send = SceneStringNames::get_singleton()->Master;
}
bus_map[attempt] = buses[i];
@@ -1582,7 +1583,7 @@ void AudioServer::set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout) {
for (int i = 0; i < p_bus_layout->buses.size(); i++) {
Bus *bus = memnew(Bus);
if (i == 0) {
bus->name = "Master";
bus->name = SceneStringNames::get_singleton()->Master;
} else {
bus->name = p_bus_layout->buses[i].name;
bus->send = p_bus_layout->buses[i].send;
@@ -1891,5 +1892,5 @@ void AudioBusLayout::_get_property_list(List<PropertyInfo> *p_list) const {
AudioBusLayout::AudioBusLayout() {
buses.resize(1);
buses.write[0].name = "Master";
buses.write[0].name = SceneStringNames::get_singleton()->Master;
}