diff --git a/src/sfizz/EQPool.cpp b/src/sfizz/EQPool.cpp index 1004328a..c79cbfeb 100644 --- a/src/sfizz/EQPool.cpp +++ b/src/sfizz/EQPool.cpp @@ -30,9 +30,13 @@ void sfz::EQHolder::setup(const EQDescription& description, unsigned numChannels void sfz::EQHolder::process(const float** inputs, float** outputs, unsigned numFrames) { - if (description == nullptr) { + auto justCopy = [&]() { for (unsigned channelIdx = 0; channelIdx < eq.channels(); channelIdx++) copy({ inputs[channelIdx], numFrames }, { outputs[channelIdx], numFrames }); + }; + + if (description == nullptr) { + justCopy(); return; } @@ -56,6 +60,11 @@ void sfz::EQHolder::process(const float** inputs, float** outputs, unsigned numF } lastGain = Default::eqGainRange.clamp(lastGain); + if (lastGain == 0.0f) { + justCopy(); + return; + } + eq.process(inputs, outputs, lastFrequency, lastBandwidth, lastGain, numFrames); } float sfz::EQHolder::getLastFrequency() const