diff options
author | Chris Robinson <[email protected]> | 2018-07-21 14:22:52 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-07-21 14:22:52 -0700 |
commit | 809f709ba6afd81defae132128f68d0fce56ea82 (patch) | |
tree | 1b43d847065240eea83b360d22c6dbb6949ccfb5 /Alc/effects | |
parent | 6fe1ffa3bb822105f1f0a848adba22478eef02a9 (diff) |
Limit the normalized filter frequency to under half
Nearing half, weird things can start happening with the filters' generated sine
and cosine values.
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/modulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |