diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-01-06 22:59:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 22:59:29 +0100 |
commit | 163f6f5fe87d11645e94cd49f41226ab03063e53 (patch) | |
tree | fe8fd83df75c4f498986f51c6853f11cdd68f49f /servers/audio_server.cpp | |
parent | 670405905d40280294e5b8100c10294f54e9b6c9 (diff) | |
parent | 7c6b659bd799080ca3a84110b112313a8cd12b1f (diff) |
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
Diffstat (limited to 'servers/audio_server.cpp')
-rw-r--r-- | servers/audio_server.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 5d57cdbd82..6b4435a991 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -1342,8 +1342,7 @@ void AudioServer::init_channels_and_buffers() { void AudioServer::init() { channel_disable_threshold_db = GLOBAL_DEF_RST("audio/buses/channel_disable_threshold_db", -60.0); - channel_disable_frames = float(GLOBAL_DEF_RST("audio/buses/channel_disable_time", 2.0)) * get_mix_rate(); - ProjectSettings::get_singleton()->set_custom_property_info("audio/buses/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); + channel_disable_frames = float(GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 2.0)) * get_mix_rate(); buffer_size = 512; //hardcoded for now init_channels_and_buffers(); |