diff options
author | Chris Robinson <[email protected]> | 2023-02-06 12:35:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-06 12:35:51 -0800 |
commit | 0de7ea42fa197833bff70b4c370ed29f9859889d (patch) | |
tree | a7c61b3238d135728abbb7fe0496581a9510efb8 /core/mastering.cpp | |
parent | ff530e982ec7cd8eea7033ef7dd4451e81aa32e5 (diff) |
Avoid using auto for lambda parameters
Diffstat (limited to 'core/mastering.cpp')
-rw-r--r-- | core/mastering.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/mastering.cpp b/core/mastering.cpp index 88a0b5e0..cff162da 100644 --- a/core/mastering.cpp +++ b/core/mastering.cpp @@ -87,10 +87,10 @@ void ShiftSlidingHold(SlidingHold *Hold, const uint n) if(exp_last-exp_begin < 0) { std::transform(exp_begin, std::end(Hold->mExpiries), exp_begin, - [n](auto a){ return a - n; }); + [n](uint e){ return e - n; }); exp_begin = std::begin(Hold->mExpiries); } - std::transform(exp_begin, exp_last+1, exp_begin, [n](auto a){ return a - n; }); + std::transform(exp_begin, exp_last+1, exp_begin, [n](uint e){ return e - n; }); } @@ -155,7 +155,7 @@ void PeakDetector(Compressor *Comp, const uint SamplesToDo) /* Clamp the minimum amplitude to near-zero and convert to logarithm. */ auto side_begin = std::begin(Comp->mSideChain) + Comp->mLookAhead; std::transform(side_begin, side_begin+SamplesToDo, side_begin, - [](auto s) { return std::log(maxf(0.000001f, s)); }); + [](float s) { return std::log(maxf(0.000001f, s)); }); } /* An optional hold can be used to extend the peak detector so it can more @@ -404,7 +404,7 @@ void Compressor::process(const uint SamplesToDo, FloatBufferLine *OutBuffer) { float *buffer{al::assume_aligned<16>(input.data())}; std::transform(buffer, buffer+SamplesToDo, buffer, - [preGain](auto a){ return a * preGain; }); + [preGain](float s) { return s * preGain; }); }; std::for_each(OutBuffer, OutBuffer+numChans, apply_gain); } @@ -430,7 +430,7 @@ void Compressor::process(const uint SamplesToDo, FloatBufferLine *OutBuffer) float *buffer{al::assume_aligned<16>(input.data())}; const float *gains{al::assume_aligned<16>(&sideChain[0])}; std::transform(gains, gains+SamplesToDo, buffer, buffer, - [](auto a, auto b){ return a * b; }); + [](float g, float s) { return g * s; }); }; std::for_each(OutBuffer, OutBuffer+numChans, apply_comp); |