From 3262a3c5480dbefdc09776c805e18e23e9abe806 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 2 Dec 2012 17:50:50 +0000 Subject: [PATCH] Fix to reverb algorithm. --- modules/juce_audio_basics/effects/juce_Reverb.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_basics/effects/juce_Reverb.h b/modules/juce_audio_basics/effects/juce_Reverb.h index 2f1f54e0f6..1280db9631 100644 --- a/modules/juce_audio_basics/effects/juce_Reverb.h +++ b/modules/juce_audio_basics/effects/juce_Reverb.h @@ -176,11 +176,10 @@ public: const float input = samples[i] * gain; float output = 0; - int j; - for (j = 0; j < numCombs; ++j) // accumulate the comb filters in parallel + for (int j = 0; j < numCombs; ++j) // accumulate the comb filters in parallel output += comb[0][j].process (input); - for (j = 0; j < numAllPasses; ++j) // run the allpass filters in series + for (int j = 0; j < numAllPasses; ++j) // run the allpass filters in series output = allPass[0][j].process (output); samples[i] = output * wet1 + input * dry; @@ -205,7 +204,7 @@ private: shouldUpdateDamping = false; if (isFrozen (parameters.freezeMode)) - setDamping (1.0f, 0.0f); + setDamping (0.0f, 1.0f); else setDamping (parameters.damping * dampScaleFactor, parameters.roomSize * roomScaleFactor + roomOffset);