From e588d10b4cc0f70f00e50be3c73fe1155745e7a7 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 20 Oct 2022 11:08:56 +1000 Subject: [PATCH] Revert "verblib: Try fixing an issue in stereo mode." This reverts commit 0788be818b65739684fe748ecfcae5c759b56c7a. This change was technically incorrect. Reverting this change for now until a better fix is in place. Likely this will require an extra parameter for controlling this. --- extras/nodes/ma_reverb_node/verblib.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/extras/nodes/ma_reverb_node/verblib.h b/extras/nodes/ma_reverb_node/verblib.h index 9fd5752e..f13f6dfa 100644 --- a/extras/nodes/ma_reverb_node/verblib.h +++ b/extras/nodes/ma_reverb_node/verblib.h @@ -462,19 +462,19 @@ int verblib_initialize ( verblib* verb, unsigned long sample_rate, unsigned int void verblib_process ( verblib* verb, const float* input_buffer, float* output_buffer, unsigned long frames ) { int i; - float outL, outR, inputL, inputR; + float outL, outR, input; if ( verb->channels == 1 ) { while ( frames-- > 0 ) { outL = 0.0f; - inputL = ( input_buffer[0] * 2.0f ) * verb->gain; + input = ( input_buffer[0] * 2.0f ) * verb->gain; /* Accumulate comb filters in parallel. */ for ( i = 0; i < verblib_numcombs; i++ ) { - outL += verblib_comb_process ( &verb->combL[i], inputL ); + outL += verblib_comb_process ( &verb->combL[i], input ); } /* Feed through allpasses in series. */ @@ -496,14 +496,13 @@ void verblib_process ( verblib* verb, const float* input_buffer, float* output_b while ( frames-- > 0 ) { outL = outR = 0.0f; - inputL = ( input_buffer[0] * 2 ) * verb->gain; - inputR = ( input_buffer[1] * 2 ) * verb->gain; + input = ( input_buffer[0] + input_buffer[1] ) * verb->gain; /* Accumulate comb filters in parallel. */ for ( i = 0; i < verblib_numcombs; i++ ) { - outL += verblib_comb_process ( &verb->combL[i], inputL ); - outR += verblib_comb_process ( &verb->combR[i], inputR ); + outL += verblib_comb_process ( &verb->combL[i], input ); + outR += verblib_comb_process ( &verb->combR[i], input ); } /* Feed through allpasses in series. */