From 72e4b603747124b398448cf3b408d09ff0544015 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 Jun 2018 01:40:17 -0700 Subject: Clamp the maximum normalized reference frequency too --- Alc/effects/modulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Alc') diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index e6143001..a5180669 100644 --- a/Alc/effects/modulator.c +++ b/Alc/effects/modulator.c @@ -140,7 +140,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCcontext state->step = clampi(state->step, 1, WAVEFORM_FRACONE-1); f0norm = props->Modulator.HighPassCutoff / (ALfloat)device->Frequency; - f0norm = maxf(f0norm, 0.003125f); + f0norm = clampf(f0norm, 1.0f/512.0f, 0.5f); /* Bandwidth value is constant in octaves. */ BiquadFilter_setParams(&state->Chans[0].Filter, BiquadType_HighPass, 1.0f, f0norm, calc_rcpQ_from_bandwidth(f0norm, 0.75f)); -- cgit v1.2.3