From 809f709ba6afd81defae132128f68d0fce56ea82 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 21 Jul 2018 14:22:52 -0700 Subject: Limit the normalized filter frequency to under half Nearing half, weird things can start happening with the filters' generated sine and cosine values. --- Alc/effects/modulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index 797a2075..9855b1b8 100644 --- a/Alc/effects/modulator.c +++ b/Alc/effects/modulator.c @@ -148,7 +148,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCcontext state->GetSamples = ModulateSquare; f0norm = props->Modulator.HighPassCutoff / (ALfloat)device->Frequency; - f0norm = clampf(f0norm, 1.0f/512.0f, 0.5f); + 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, f0norm, calc_rcpQ_from_bandwidth(f0norm, 0.75f)); -- cgit v1.2.3