aboutsummaryrefslogtreecommitdiffstats
path: root/core/mastering.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-04-06 17:41:24 -0700
committerChris Robinson <[email protected]>2022-04-06 17:41:24 -0700
commit6a9fe1e2c1c06b6bc04c3b78e2a9f69dd7a5ec6e (patch)
treea6ffd2560ab4e6b632b2db5f8e6db6de7823d7dd /core/mastering.cpp
parent707f4cca27e096c167e79619642fbe2e872ee4c8 (diff)
Rename lerp to avoid conflicts with C++20's std::lerp
Diffstat (limited to 'core/mastering.cpp')
-rw-r--r--core/mastering.cpp10
1 files changed, 5 insertions, 5 deletions
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)
{