diff options
author | Chris Robinson <[email protected]> | 2018-04-29 14:02:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-04-29 14:02:33 -0700 |
commit | 2385ab700cc0aa4aa3895a029e20ee76ffe4c736 (patch) | |
tree | b1448d708f574d7d649b311b321bedfe194b261a | |
parent | 242ed45f6576435e5eb8be08e5a5fa292d123113 (diff) |
Avoid potentially calling log10f(0)
-rw-r--r-- | Alc/mastering.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/mastering.c b/Alc/mastering.c index 91267d83..1636c8d9 100644 --- a/Alc/mastering.c +++ b/Alc/mastering.c @@ -98,7 +98,7 @@ static void FollowEnvelope(Compressor *Comp, const ALsizei SamplesToDo) for(i = 0;i < SamplesToDo;i++) { - ALfloat env = maxf(-6.0f, log10f(Comp->Envelope[i])); + ALfloat env = log10f(maxf(Comp->Envelope[i], 0.000001f)); ALfloat slope = minf(1.0f, fabsf(env - last) / 4.5f); if(env > last) |