From fe83de181e6c40219ca7b23245327a89f9c77925 Mon Sep 17 00:00:00 2001 From: jatin Date: Sat, 6 Apr 2024 12:20:42 -0700 Subject: [PATCH] CI fixes --- .../chowdsp_EllipticFilter.h | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/modules/dsp/chowdsp_filters/HigherOrderFilters/chowdsp_EllipticFilter.h b/modules/dsp/chowdsp_filters/HigherOrderFilters/chowdsp_EllipticFilter.h index 5fe168d57..54f340c9f 100644 --- a/modules/dsp/chowdsp_filters/HigherOrderFilters/chowdsp_EllipticFilter.h +++ b/modules/dsp/chowdsp_filters/HigherOrderFilters/chowdsp_EllipticFilter.h @@ -44,22 +44,17 @@ class EllipticFilter : public SOSFilter auto calcCoefsForQ = [&] (FloatType stageFreqOff, FloatType stageQ, FloatType stageLPGain, size_t stageOrder) { FloatType bCoefs[3], bOppCoefs[3], aCoefs[3]; - auto calcBaseCoefficients = [&] (FloatType stageFreqOff, FloatType stageQ) + switch (type) { - switch (type) - { - case EllipticFilterType::Lowpass: - CoefficientCalculators::calcSecondOrderLPF (bCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc); - CoefficientCalculators::calcSecondOrderHPF (bOppCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc); - break; - case EllipticFilterType::Highpass: - CoefficientCalculators::calcSecondOrderLPF (bOppCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc); - CoefficientCalculators::calcSecondOrderHPF (bCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc); - break; - } - }; - - calcBaseCoefficients (stageFreqOff, stageQ); + case EllipticFilterType::Lowpass: + CoefficientCalculators::calcSecondOrderLPF (bCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc); + CoefficientCalculators::calcSecondOrderHPF (bOppCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc); + break; + case EllipticFilterType::Highpass: + CoefficientCalculators::calcSecondOrderLPF (bOppCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc); + CoefficientCalculators::calcSecondOrderHPF (bCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc); + break; + } for (size_t i = 0; i < 3; ++i) bCoefs[i] = bOppCoefs[i] + stageLPGain * bCoefs[i];