From a5bcacb115b80ec7ea8b1af41db5b8e971bcbfc2 Mon Sep 17 00:00:00 2001 From: jmb462 Date: Wed, 17 Mar 2021 19:18:22 +0100 Subject: [PATCH] Fix AudioEffectCapture buffer length cannot be changed (cherry picked from commit b588232b8328d129133ee75db40d0569aa45787a) --- doc/classes/AudioEffectCapture.xml | 2 +- servers/audio/effects/audio_effect_capture.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index ad05b647c7b..4249b1c4a41 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -67,7 +67,7 @@ - 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. diff --git a/servers/audio/effects/audio_effect_capture.cpp b/servers/audio/effects/audio_effect_capture.cpp index 70914e0cc94..8b8a655051e 100644 --- a/servers/audio/effects/audio_effect_capture.cpp +++ b/servers/audio/effects/audio_effect_capture.cpp @@ -95,8 +95,6 @@ Ref AudioEffectCapture::instance() { } void AudioEffectCapture::set_buffer_length(float p_buffer_length_seconds) { - ERR_FAIL_COND(buffer_initialized); - buffer_length_seconds = p_buffer_length_seconds; }