summaryrefslogtreecommitdiff
path: root/scene/audio
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2015-09-26 21:03:05 +0200
committerRémi Verschelde <rverschelde@gmail.com>2015-09-26 21:06:12 +0200
commit3d7740ba1769debcd4e231a73657d002e9eb5f5e (patch)
tree7bf77356e062af1793e41745b659e61f3a40db89 /scene/audio
parent1e147c4945cfde20d05a58d435eb8f748019eb72 (diff)
Fix default/filter/* parsing in _get
Closes #2542. The actual flaw was identified by @reduz. Also fix a typo.
Diffstat (limited to 'scene/audio')
-rw-r--r--scene/audio/sample_player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/audio/sample_player.cpp b/scene/audio/sample_player.cpp
index 4db6b31946..4e2c3f5dfd 100644
--- a/scene/audio/sample_player.cpp
+++ b/scene/audio/sample_player.cpp
@@ -102,7 +102,7 @@ bool SamplePlayer::_get(const StringName& p_name,Variant &r_ret) const {
r_ret= get_sample_library();
} else if (name.begins_with("default/")) {
- String what=name.get_slicec('/',1);
+ String what=name.right(8);
if (what=="volume_db")
r_ret= get_default_volume_db();
@@ -164,7 +164,7 @@ void SamplePlayer::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back( PropertyInfo( Variant::REAL, "default/filter/cutoff", PROPERTY_HINT_RANGE, "20,16384.0,0.01"));
p_list->push_back( PropertyInfo( Variant::REAL, "default/filter/resonance", PROPERTY_HINT_RANGE, "0,4,0.01"));
p_list->push_back( PropertyInfo( Variant::REAL, "default/filter/gain", PROPERTY_HINT_RANGE, "0,2,0.01"));
- p_list->push_back( PropertyInfo( Variant::INT, "default/reverb_room", PROPERTY_HINT_ENUM, "Small,Medimum,Large,Hall"));
+ p_list->push_back( PropertyInfo( Variant::INT, "default/reverb_room", PROPERTY_HINT_ENUM, "Small,Medium,Large,Hall"));
p_list->push_back( PropertyInfo( Variant::REAL, "default/reverb_send", PROPERTY_HINT_RANGE, "0,1,0.01"));
p_list->push_back( PropertyInfo( Variant::REAL, "default/chorus_send", PROPERTY_HINT_RANGE, "0,1,0.01"));