aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer/mixer_c.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-16 07:16:31 -0700
committerChris Robinson <[email protected]>2019-09-16 07:16:31 -0700
commitbf2c865d3953370ccf9d56e7a5dc6d2d4c587be1 (patch)
treebf9dd4ec305dfc61dd5d899d883453e94f0612f3 /alc/mixer/mixer_c.cpp
parente16e2269b6a18c960a25d58f43ffad5ed408bee9 (diff)
Clean up some more shadowing warnings
Diffstat (limited to 'alc/mixer/mixer_c.cpp')
-rw-r--r--alc/mixer/mixer_c.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp
index 7beab1a9..6e96e54e 100644
--- a/alc/mixer/mixer_c.cpp
+++ b/alc/mixer/mixer_c.cpp
@@ -188,13 +188,14 @@ void MixRow_<CTag>(const al::span<float> OutBuffer, const al::span<const float>
{
for(const float gain : Gains)
{
- const float *RESTRICT src{InSamples};
+ const float *RESTRICT input{InSamples};
InSamples += InStride;
if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD))
continue;
- std::transform(OutBuffer.begin(), OutBuffer.end(), src, OutBuffer.begin(),
- [gain](const ALfloat cur, const ALfloat src) -> ALfloat { return cur + src*gain; });
+ auto do_mix = [gain](const float cur, const float src) noexcept -> float
+ { return cur + src*gain; };
+ std::transform(OutBuffer.begin(), OutBuffer.end(), input, OutBuffer.begin(), do_mix);
}
}