Simplify a lower-bound clamp

This commit is contained in:
Chris Robinson 2018-09-28 18:34:21 -07:00
parent 1684b2cc5f
commit 51a447852f

View File

@ -263,8 +263,7 @@ static void GainCompressor(Compressor *Comp, const ALsizei SamplesToDo)
if(autoDeclip) if(autoDeclip)
{ {
x_G = sideChain[(index + i) & mask]; x_G = sideChain[(index + i) & mask];
if((x_G - c_dev - c_est - y_L) > threshold) c_dev = maxf(c_dev, x_G - y_L - threshold - c_est);
c_dev = x_G - c_est - y_L - threshold;
} }
postGain = -(c_dev + c_est); postGain = -(c_dev + c_est);