aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-19 09:10:36 -0800
committerChris Robinson <[email protected]>2018-11-19 09:10:36 -0800
commit387a34ca002bdc25cc31fb8514c0fa2e44af6e1b (patch)
tree268ac0fff88d694d90502072e6fce2b38c831e10 /Alc/effects
parent07386e79de93988faccc98166a036b6234ff9fe1 (diff)
Clean up the biquad filter a bit
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/distortion.cpp4
-rw-r--r--Alc/effects/echo.cpp2
-rw-r--r--Alc/effects/equalizer.cpp8
-rw-r--r--Alc/effects/modulator.cpp2
-rw-r--r--Alc/effects/reverb.cpp8
5 files changed, 12 insertions, 12 deletions
diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp
index 31f07de3..69603db9 100644
--- a/Alc/effects/distortion.cpp
+++ b/Alc/effects/distortion.cpp
@@ -93,14 +93,14 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, const ALCcontex
/* Multiply sampling frequency by the amount of oversampling done during
* processing.
*/
- BiquadFilter_setParams(&state->lowpass, BiquadType_LowPass, 1.0f,
+ BiquadFilter_setParams(&state->lowpass, BiquadType::LowPass, 1.0f,
cutoff / (frequency*4.0f), calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth)
);
cutoff = props->Distortion.EQCenter;
/* Convert bandwidth in Hz to octaves. */
bandwidth = props->Distortion.EQBandwidth / (cutoff * 0.67f);
- BiquadFilter_setParams(&state->bandpass, BiquadType_BandPass, 1.0f,
+ BiquadFilter_setParams(&state->bandpass, BiquadType::BandPass, 1.0f,
cutoff / (frequency*4.0f), calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth)
);
diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp
index 47d21e6c..946c07b4 100644
--- a/Alc/effects/echo.cpp
+++ b/Alc/effects/echo.cpp
@@ -136,7 +136,7 @@ static ALvoid ALechoState_update(ALechoState *state, const ALCcontext *context,
state->FeedGain = props->Echo.Feedback;
gainhf = maxf(1.0f - props->Echo.Damping, 0.0625f); /* Limit -24dB */
- BiquadFilter_setParams(&state->Filter, BiquadType_HighShelf,
+ BiquadFilter_setParams(&state->Filter, BiquadType::HighShelf,
gainhf, LOWPASSFREQREF/frequency, calc_rcpQ_from_slope(gainhf, 1.0f)
);
diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp
index 17eee5b4..ad101a7e 100644
--- a/Alc/effects/equalizer.cpp
+++ b/Alc/effects/equalizer.cpp
@@ -136,13 +136,13 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCcontext
*/
gain = maxf(sqrtf(props->Equalizer.LowGain), 0.0625f); /* Limit -24dB */
f0norm = props->Equalizer.LowCutoff/frequency;
- BiquadFilter_setParams(&state->Chans[0].filter[0], BiquadType_LowShelf,
+ BiquadFilter_setParams(&state->Chans[0].filter[0], BiquadType::LowShelf,
gain, f0norm, calc_rcpQ_from_slope(gain, 0.75f)
);
gain = maxf(props->Equalizer.Mid1Gain, 0.0625f);
f0norm = props->Equalizer.Mid1Center/frequency;
- BiquadFilter_setParams(&state->Chans[0].filter[1], BiquadType_Peaking,
+ BiquadFilter_setParams(&state->Chans[0].filter[1], BiquadType::Peaking,
gain, f0norm, calc_rcpQ_from_bandwidth(
f0norm, props->Equalizer.Mid1Width
)
@@ -150,7 +150,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCcontext
gain = maxf(props->Equalizer.Mid2Gain, 0.0625f);
f0norm = props->Equalizer.Mid2Center/frequency;
- BiquadFilter_setParams(&state->Chans[0].filter[2], BiquadType_Peaking,
+ BiquadFilter_setParams(&state->Chans[0].filter[2], BiquadType::Peaking,
gain, f0norm, calc_rcpQ_from_bandwidth(
f0norm, props->Equalizer.Mid2Width
)
@@ -158,7 +158,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCcontext
gain = maxf(sqrtf(props->Equalizer.HighGain), 0.0625f);
f0norm = props->Equalizer.HighCutoff/frequency;
- BiquadFilter_setParams(&state->Chans[0].filter[3], BiquadType_HighShelf,
+ BiquadFilter_setParams(&state->Chans[0].filter[3], BiquadType::HighShelf,
gain, f0norm, calc_rcpQ_from_slope(gain, 0.75f)
);
diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp
index e96859f7..b7ee97d9 100644
--- a/Alc/effects/modulator.cpp
+++ b/Alc/effects/modulator.cpp
@@ -152,7 +152,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCcontext
f0norm = props->Modulator.HighPassCutoff / (ALfloat)device->Frequency;
f0norm = clampf(f0norm, 1.0f/512.0f, 0.49f);
/* Bandwidth value is constant in octaves. */
- BiquadFilter_setParams(&state->Chans[0].Filter, BiquadType_HighPass, 1.0f,
+ BiquadFilter_setParams(&state->Chans[0].Filter, BiquadType::HighPass, 1.0f,
f0norm, calc_rcpQ_from_bandwidth(f0norm, 0.75f));
for(i = 1;i < MAX_EFFECT_CHANNELS;i++)
BiquadFilter_copyParams(&state->Chans[i].Filter, &state->Chans[0].Filter);
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index d486e8b4..68c76337 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -728,9 +728,9 @@ static void CalcT60DampingCoeffs(const ALfloat length, const ALfloat lfDecayTime
ALfloat hfGain = CalcDecayCoeff(length, hfDecayTime);
filter->MidGain[1] = mfGain;
- BiquadFilter_setParams(&filter->LFFilter, BiquadType_LowShelf, lfGain/mfGain, lf0norm,
+ BiquadFilter_setParams(&filter->LFFilter, BiquadType::LowShelf, lfGain/mfGain, lf0norm,
calc_rcpQ_from_slope(lfGain/mfGain, 1.0f));
- BiquadFilter_setParams(&filter->HFFilter, BiquadType_HighShelf, hfGain/mfGain, hf0norm,
+ BiquadFilter_setParams(&filter->HFFilter, BiquadType::HighShelf, hfGain/mfGain, hf0norm,
calc_rcpQ_from_slope(hfGain/mfGain, 1.0f));
}
@@ -964,11 +964,11 @@ static void ReverbState_update(ReverbState *State, const ALCcontext *Context, co
* killing most of the signal.
*/
gainhf = maxf(props->Reverb.GainHF, 0.001f);
- BiquadFilter_setParams(&State->Filter[0].Lp, BiquadType_HighShelf, gainhf, hf0norm,
+ BiquadFilter_setParams(&State->Filter[0].Lp, BiquadType::HighShelf, gainhf, hf0norm,
calc_rcpQ_from_slope(gainhf, 1.0f));
lf0norm = minf(props->Reverb.LFReference / frequency, 0.49f);
gainlf = maxf(props->Reverb.GainLF, 0.001f);
- BiquadFilter_setParams(&State->Filter[0].Hp, BiquadType_LowShelf, gainlf, lf0norm,
+ BiquadFilter_setParams(&State->Filter[0].Hp, BiquadType::LowShelf, gainlf, lf0norm,
calc_rcpQ_from_slope(gainlf, 1.0f));
for(i = 1;i < NUM_LINES;i++)
{