Sfoglia il codice sorgente

Fix AudioEffectCapture buffer length cannot be changed

jmb462 4 anni fa
parent
commit
b588232b83

+ 1 - 1
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>

+ 0 - 2
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;
 }