From 78cb70a5f9f2782e1335aea03168ffee2fea0122 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 13 Jan 2018 09:14:46 -0800 Subject: Replace some freq_mult variable names with f0norm The latter is a bit more descriptive as f0 is often used to denote the reference frequency of a filter, so f0norm indicates the normalized reference frequency (ref_freq / sample_rate). --- Alc/effects/reverb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Alc/effects/reverb.c') diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index f6cd2b04..49362e2a 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -1281,23 +1281,23 @@ static ALvoid ALreverbState_update(ALreverbState *State, const ALCcontext *Conte const ALCdevice *Device = Context->Device; const ALlistener *Listener = Context->Listener; ALuint frequency = Device->Frequency; - ALfloat lfScale, hfScale, hfRatio; + ALfloat lf0norm, hf0norm, hfRatio; ALfloat lfDecayTime, hfDecayTime; ALfloat gain, gainlf, gainhf; ALsizei i; /* Calculate the master filters */ - hfScale = props->Reverb.HFReference / frequency; + hf0norm = props->Reverb.HFReference / frequency; /* Restrict the filter gains from going below -60dB to keep the filter from * killing most of the signal. */ gainhf = maxf(props->Reverb.GainHF, 0.001f); ALfilterState_setParams(&State->Filter[0].Lp, ALfilterType_HighShelf, - gainhf, hfScale, calc_rcpQ_from_slope(gainhf, 1.0f)); - lfScale = props->Reverb.LFReference / frequency; + gainhf, hf0norm, calc_rcpQ_from_slope(gainhf, 1.0f)); + lf0norm = props->Reverb.LFReference / frequency; gainlf = maxf(props->Reverb.GainLF, 0.001f); ALfilterState_setParams(&State->Filter[0].Hp, ALfilterType_LowShelf, - gainlf, lfScale, calc_rcpQ_from_slope(gainlf, 1.0f)); + gainlf, lf0norm, calc_rcpQ_from_slope(gainlf, 1.0f)); for(i = 1;i < 4;i++) { ALfilterState_copyParams(&State->Filter[i].Lp, &State->Filter[0].Lp); @@ -1341,7 +1341,7 @@ static ALvoid ALreverbState_update(ALreverbState *State, const ALCcontext *Conte /* Update the late lines. */ UpdateLateLines(props->Reverb.Density, props->Reverb.Diffusion, lfDecayTime, props->Reverb.DecayTime, hfDecayTime, - F_TAU * lfScale, F_TAU * hfScale, + F_TAU * lf0norm, F_TAU * hf0norm, props->Reverb.EchoTime, props->Reverb.EchoDepth, frequency, State); -- cgit v1.2.3