diff options
-rw-r--r-- | OpenAL32/alFilter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index f15a2800..7fb6a5e9 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -338,6 +338,9 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g ALfloat alpha; ALfloat w0; + // Limit gain to -100dB + gain = maxf(gain, 0.00001f); + w0 = 2.0f*F_PI * freq_scale; /* Calculate filter coefficients depending on filter type */ |