diff options
author | Chris Robinson <[email protected]> | 2013-07-21 18:42:14 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-07-21 18:42:14 -0700 |
commit | 393d0eb1383cd2c2194ff638464f36e7680225ce (patch) | |
tree | a3d36fedefb11f476fc62184509916820c5c1741 | |
parent | 51791e6a54fe382ff91a3845292934e64b7dfbad (diff) |
Limit lower filter gain to -100dB
-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 */ |