diff options
author | Chris Robinson <[email protected]> | 2018-09-28 18:34:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-09-28 18:34:21 -0700 |
commit | 51a447852f17b19144e879601cdfa09a6bbdc3bd (patch) | |
tree | 1c6d7cfdfa4b1787f9286f4cf08599e5aa9a8ed4 /Alc | |
parent | 1684b2cc5f41d03966d2a8e03c739aa9933e2348 (diff) |
Simplify a lower-bound clamp
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/mastering.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Alc/mastering.c b/Alc/mastering.c index 52813a54..e7908828 100644 --- a/Alc/mastering.c +++ b/Alc/mastering.c @@ -263,8 +263,7 @@ static void GainCompressor(Compressor *Comp, const ALsizei SamplesToDo) if(autoDeclip) { x_G = sideChain[(index + i) & mask]; - if((x_G - c_dev - c_est - y_L) > threshold) - c_dev = x_G - c_est - y_L - threshold; + c_dev = maxf(c_dev, x_G - y_L - threshold - c_est); } postGain = -(c_dev + c_est); |