aboutsummaryrefslogtreecommitdiffstats
path: root/core
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
parent707f4cca27e096c167e79619642fbe2e872ee4c8 (diff)
Rename lerp to avoid conflicts with C++20's std::lerp
Diffstat (limited to 'core')
-rw-r--r--core/mastering.cpp10
-rw-r--r--core/mixer/mixer_c.cpp2
-rw-r--r--core/mixer/mixer_neon.cpp2
-rw-r--r--core/mixer/mixer_sse2.cpp2
-rw-r--r--core/mixer/mixer_sse41.cpp2
-rw-r--r--core/voice.cpp4
6 files changed, 11 insertions, 11 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)
{
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index f82f7dd1..f3e6aa6a 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -26,7 +26,7 @@ constexpr uint FracPhaseDiffOne{1 << FracPhaseBitDiff};
inline float do_point(const InterpState&, const float *RESTRICT vals, const uint)
{ return vals[0]; }
inline float do_lerp(const InterpState&, const float *RESTRICT vals, const uint frac)
-{ return lerp(vals[0], vals[1], static_cast<float>(frac)*(1.0f/MixerFracOne)); }
+{ return lerpf(vals[0], vals[1], static_cast<float>(frac)*(1.0f/MixerFracOne)); }
inline float do_cubic(const InterpState&, const float *RESTRICT vals, const uint frac)
{ return cubic(vals[0], vals[1], vals[2], vals[3], static_cast<float>(frac)*(1.0f/MixerFracOne)); }
inline float do_bsinc(const InterpState &istate, const float *RESTRICT vals, const uint frac)
diff --git a/core/mixer/mixer_neon.cpp b/core/mixer/mixer_neon.cpp
index 7b6e5ebf..a3468926 100644
--- a/core/mixer/mixer_neon.cpp
+++ b/core/mixer/mixer_neon.cpp
@@ -101,7 +101,7 @@ float *Resample_<LerpTag,NEONTag>(const InterpState*, float *RESTRICT src, uint
frac = static_cast<uint>(vgetq_lane_s32(frac4, 0));
do {
- *(dst_iter++) = lerp(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
+ *(dst_iter++) = lerpf(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
frac += increment;
src += frac>>MixerFracBits;
diff --git a/core/mixer/mixer_sse2.cpp b/core/mixer/mixer_sse2.cpp
index 99d04210..2c0adb8a 100644
--- a/core/mixer/mixer_sse2.cpp
+++ b/core/mixer/mixer_sse2.cpp
@@ -78,7 +78,7 @@ float *Resample_<LerpTag,SSE2Tag>(const InterpState*, float *RESTRICT src, uint
frac = static_cast<uint>(_mm_cvtsi128_si32(frac4));
do {
- *(dst_iter++) = lerp(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
+ *(dst_iter++) = lerpf(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
frac += increment;
src += frac>>MixerFracBits;
diff --git a/core/mixer/mixer_sse41.cpp b/core/mixer/mixer_sse41.cpp
index 032e5d54..cfedfd65 100644
--- a/core/mixer/mixer_sse41.cpp
+++ b/core/mixer/mixer_sse41.cpp
@@ -83,7 +83,7 @@ float *Resample_<LerpTag,SSE4Tag>(const InterpState*, float *RESTRICT src, uint
frac = static_cast<uint>(_mm_cvtsi128_si32(frac4));
do {
- *(dst_iter++) = lerp(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
+ *(dst_iter++) = lerpf(src[0], src[1], static_cast<float>(frac) * (1.0f/MixerFracOne));
frac += increment;
src += frac>>MixerFracBits;
diff --git a/core/voice.cpp b/core/voice.cpp
index 0060737f..e269c4a9 100644
--- a/core/voice.cpp
+++ b/core/voice.cpp
@@ -382,7 +382,7 @@ void DoHrtfMix(const float *samples, const uint DstBufferSize, DirectParams &par
if(Counter > fademix)
{
const float a{static_cast<float>(fademix) / static_cast<float>(Counter)};
- gain = lerp(parms.Hrtf.Old.Gain, TargetGain, a);
+ gain = lerpf(parms.Hrtf.Old.Gain, TargetGain, a);
}
MixHrtfFilter hrtfparams{
@@ -409,7 +409,7 @@ void DoHrtfMix(const float *samples, const uint DstBufferSize, DirectParams &par
if(Counter > DstBufferSize)
{
const float a{static_cast<float>(todo) / static_cast<float>(Counter-fademix)};
- gain = lerp(parms.Hrtf.Old.Gain, TargetGain, a);
+ gain = lerpf(parms.Hrtf.Old.Gain, TargetGain, a);
}
MixHrtfFilter hrtfparams{