diff options
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/distortion.cpp | 6 | ||||
-rw-r--r-- | Alc/effects/echo.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/equalizer.cpp | 8 | ||||
-rw-r--r-- | Alc/effects/modulator.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/reverb.cpp | 8 |
5 files changed, 12 insertions, 14 deletions
diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index d2bcd018..7ef77c69 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -79,15 +79,13 @@ void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot */ auto frequency = static_cast<ALfloat>(device->Frequency); mLowpass.setParams(BiquadType::LowPass, 1.0f, cutoff / (frequency*4.0f), - calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth) - ); + mLowpass.rcpQFromBandwidth(cutoff / (frequency*4.0f), bandwidth)); cutoff = props->Distortion.EQCenter; /* Convert bandwidth in Hz to octaves. */ bandwidth = props->Distortion.EQBandwidth / (cutoff * 0.67f); mBandpass.setParams(BiquadType::BandPass, 1.0f, cutoff / (frequency*4.0f), - calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth) - ); + mBandpass.rcpQFromBandwidth(cutoff / (frequency*4.0f), bandwidth)); ALfloat coeffs[MAX_AMBI_CHANNELS]; CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs); diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp index 9cd6fb87..158ab856 100644 --- a/Alc/effects/echo.cpp +++ b/Alc/effects/echo.cpp @@ -102,7 +102,7 @@ void EchoState::update(const ALCcontext *context, const ALeffectslot *slot, cons const ALfloat gainhf{maxf(1.0f - props->Echo.Damping, 0.0625f)}; /* Limit -24dB */ mFilter.setParams(BiquadType::HighShelf, gainhf, LOWPASSFREQREF/frequency, - calc_rcpQ_from_slope(gainhf, 1.0f)); + mFilter.rcpQFromSlope(gainhf, 1.0f)); mFeedGain = props->Echo.Feedback; diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index e1524943..cc701e8d 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -123,22 +123,22 @@ void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, gain = maxf(sqrtf(props->Equalizer.LowGain), 0.0625f); /* Limit -24dB */ f0norm = props->Equalizer.LowCutoff/frequency; mChans[0].filter[0].setParams(BiquadType::LowShelf, gain, f0norm, - calc_rcpQ_from_slope(gain, 0.75f)); + BiquadFilter::rcpQFromSlope(gain, 0.75f)); gain = maxf(props->Equalizer.Mid1Gain, 0.0625f); f0norm = props->Equalizer.Mid1Center/frequency; mChans[0].filter[1].setParams(BiquadType::Peaking, gain, f0norm, - calc_rcpQ_from_bandwidth(f0norm, props->Equalizer.Mid1Width)); + BiquadFilter::rcpQFromBandwidth(f0norm, props->Equalizer.Mid1Width)); gain = maxf(props->Equalizer.Mid2Gain, 0.0625f); f0norm = props->Equalizer.Mid2Center/frequency; mChans[0].filter[2].setParams(BiquadType::Peaking, gain, f0norm, - calc_rcpQ_from_bandwidth(f0norm, props->Equalizer.Mid2Width)); + BiquadFilter::rcpQFromBandwidth(f0norm, props->Equalizer.Mid2Width)); gain = maxf(sqrtf(props->Equalizer.HighGain), 0.0625f); f0norm = props->Equalizer.HighCutoff/frequency; mChans[0].filter[3].setParams(BiquadType::HighShelf, gain, f0norm, - calc_rcpQ_from_slope(gain, 0.75f)); + BiquadFilter::rcpQFromSlope(gain, 0.75f)); /* Copy the filter coefficients for the other input channels. */ for(ALsizei i{1};i < slot->Wet.NumChannels;++i) diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index 0ddd0510..f926cb87 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -128,7 +128,7 @@ void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, f0norm = clampf(f0norm, 1.0f/512.0f, 0.49f); /* Bandwidth value is constant in octaves. */ mChans[0].Filter.setParams(BiquadType::HighPass, 1.0f, f0norm, - calc_rcpQ_from_bandwidth(f0norm, 0.75f)); + BiquadFilter::rcpQFromBandwidth(f0norm, 0.75f)); for(ALsizei i{1};i < slot->Wet.NumChannels;++i) mChans[i].Filter.copyParamsFrom(mChans[0].Filter); diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index 6b159b0c..3c39199d 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -705,9 +705,9 @@ void T60Filter::calcCoeffs(const ALfloat length, const ALfloat lfDecayTime, MidGain[1] = mfGain; LFFilter.setParams(BiquadType::LowShelf, lfGain/mfGain, lf0norm, - calc_rcpQ_from_slope(lfGain/mfGain, 1.0f)); + LFFilter.rcpQFromSlope(lfGain/mfGain, 1.0f)); HFFilter.setParams(BiquadType::HighShelf, hfGain/mfGain, hf0norm, - calc_rcpQ_from_slope(hfGain/mfGain, 1.0f)); + HFFilter.rcpQFromSlope(hfGain/mfGain, 1.0f)); } /* Update the early reflection line lengths and gain coefficients. */ @@ -916,11 +916,11 @@ void ReverbState::update(const ALCcontext *Context, const ALeffectslot *Slot, co */ ALfloat gainhf{maxf(props->Reverb.GainHF, 0.001f)}; mFilter[0].Lp.setParams(BiquadType::HighShelf, gainhf, hf0norm, - calc_rcpQ_from_slope(gainhf, 1.0f)); + mFilter[0].Lp.rcpQFromSlope(gainhf, 1.0f)); ALfloat lf0norm{minf(props->Reverb.LFReference / frequency, 0.49f)}; ALfloat gainlf{maxf(props->Reverb.GainLF, 0.001f)}; mFilter[0].Hp.setParams(BiquadType::LowShelf, gainlf, lf0norm, - calc_rcpQ_from_slope(gainlf, 1.0f)); + mFilter[0].Hp.rcpQFromSlope(gainlf, 1.0f)); for(ALsizei i{1};i < NUM_LINES;i++) { mFilter[i].Lp.copyParamsFrom(mFilter[0].Lp); |