From 6a9fe1e2c1c06b6bc04c3b78e2a9f69dd7a5ec6e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 6 Apr 2022 17:41:24 -0700 Subject: Rename lerp to avoid conflicts with C++20's std::lerp --- core/mastering.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/mastering.cpp') diff --git a/core/mastering.cpp b/core/mastering.cpp index 3a577109..99850477 100644 --- a/core/mastering.cpp +++ b/core/mastering.cpp @@ -133,8 +133,8 @@ static void CrestDetector(Compressor *Comp, const uint SamplesToDo) { const float x2{clampf(x_abs * x_abs, 0.000001f, 1000000.0f)}; - y2_peak = maxf(x2, lerp(x2, y2_peak, a_crest)); - y2_rms = lerp(x2, y2_rms, a_crest); + y2_peak = maxf(x2, lerpf(x2, y2_peak, a_crest)); + y2_rms = lerpf(x2, y2_rms, a_crest); return y2_peak / y2_rms; }; auto side_begin = std::begin(Comp->mSideChain) + Comp->mLookAhead; @@ -243,15 +243,15 @@ void GainCompressor(Compressor *Comp, const uint SamplesToDo) * above to compensate for the chained operating mode. */ const float x_L{-slope * y_G}; - y_1 = maxf(x_L, lerp(x_L, y_1, a_rel)); - y_L = lerp(y_1, y_L, a_att); + y_1 = maxf(x_L, lerpf(x_L, y_1, a_rel)); + y_L = lerpf(y_1, y_L, a_att); /* Knee width and make-up gain automation make use of a smoothed * measurement of deviation between the control signal and estimate. * The estimate is also used to bias the measurement to hot-start its * average. */ - c_dev = lerp(-(y_L+c_est), c_dev, a_adp); + c_dev = lerpf(-(y_L+c_est), c_dev, a_adp); if(autoPostGain) { -- cgit v1.2.3