aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-07-21 18:42:14 -0700
committerChris Robinson <[email protected]>2013-07-21 18:42:14 -0700
commit393d0eb1383cd2c2194ff638464f36e7680225ce (patch)
treea3d36fedefb11f476fc62184509916820c5c1741 /OpenAL32
parent51791e6a54fe382ff91a3845292934e64b7dfbad (diff)
Limit lower filter gain to -100dB
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alFilter.c3
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 */