summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmb462 <jmb462@gmail.com>2021-03-17 19:18:22 +0100
committerjmb462 <jmb462@gmail.com>2021-03-17 23:07:38 +0100
commitb588232b8328d129133ee75db40d0569aa45787a (patch)
treeb9d8cf53e9b464392f6fcb398984c755cad34d59
parent888051889ed0b63a6b88d3a7e0c2bfbbacde7b4b (diff)
Fix AudioEffectCapture buffer length cannot be changed
-rw-r--r--doc/classes/AudioEffectCapture.xml2
-rw-r--r--servers/audio/effects/audio_effect_capture.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index cf3d87c2e4..c7ee621ca6 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -67,7 +67,7 @@
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1">
- Length of the internal ring buffer, in seconds.
+ Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.
</member>
</members>
<constants>
diff --git a/servers/audio/effects/audio_effect_capture.cpp b/servers/audio/effects/audio_effect_capture.cpp
index 37e4122e50..78837c7531 100644
--- a/servers/audio/effects/audio_effect_capture.cpp
+++ b/servers/audio/effects/audio_effect_capture.cpp
@@ -91,8 +91,6 @@ Ref<AudioEffectInstance> AudioEffectCapture::instance() {
}
void AudioEffectCapture::set_buffer_length(float p_buffer_length_seconds) {
- ERR_FAIL_COND(buffer_initialized);
-
buffer_length_seconds = p_buffer_length_seconds;
}