aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/alFilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index d3abb7b3..b5186470 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -342,10 +342,10 @@ ALfloat lpCoeffCalc(ALfloat g, ALfloat cw)
{
ALfloat a = 0.0f;
- /* Be careful with gains < 0.001, as that causes the coefficient head
- * towards 1, which will flatten the signal */
if(g < 0.9999f) /* 1-epsilon */
{
+ /* Be careful with gains < 0.001, as that causes the coefficient head
+ * towards 1, which will flatten the signal */
g = maxf(g, 0.001f);
a = (1 - g*cw - aluSqrt(2*g*(1-cw) - g*g*(1 - cw*cw))) /
(1 - g);