From 9e326846f654f751445e1ce2ccfc6d00c91a993d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Aug 2019 10:36:17 -0700 Subject: Simplify passing some span parameters --- alc/effects/reverb.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'alc/effects/reverb.cpp') diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 9fbff668..48ff93ae 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1250,9 +1250,8 @@ void EarlyReflection_Unfaded(ReverbState *State, const ALsizei offset, const ALs * bounce to improve the initial diffusion in the late reverb. */ const ALsizei late_feed_tap{offset - State->mLateFeedTap}; - const al::span out{State->mEarlySamples}; - VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, - {out.cbegin(), out.cend()}, todo); + const al::span out{State->mEarlySamples}; + VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, out, todo); } void EarlyReflection_Faded(ReverbState *State, const ALsizei offset, const ALsizei todo, const ALfloat fade) @@ -1323,9 +1322,8 @@ void EarlyReflection_Faded(ReverbState *State, const ALsizei offset, const ALsiz early_delay.write(offset, NUM_LINES-1-j, temps[j].data(), todo); const ALsizei late_feed_tap{offset - State->mLateFeedTap}; - const al::span out{State->mEarlySamples}; - VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, 0, {out.cbegin(), out.cend()}, - todo); + const al::span out{State->mEarlySamples}; + VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, 0, out, todo); } /* This generates the reverb tail using a modified feed-back delay network @@ -1386,8 +1384,7 @@ void LateReverb_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei std::copy_n(temps[j].begin(), todo, State->mLateSamples[j].begin() + base); /* Finally, scatter and bounce the results to refeed the feedback buffer. */ - VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, 0, {temps.cbegin(), temps.cend()}, - todo); + VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, 0, temps, todo); } void LateReverb_Faded(ReverbState *State, const ALsizei offset, const ALsizei todo, const ALfloat fade) @@ -1446,8 +1443,7 @@ void LateReverb_Faded(ReverbState *State, const ALsizei offset, const ALsizei to for(size_t j{0u};j < NUM_LINES;j++) std::copy_n(temps[j].begin(), todo, State->mLateSamples[j].begin()); - VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, 0, {temps.cbegin(), temps.cend()}, - todo); + VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, 0, temps, todo); } void ReverbState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, const al::span samplesOut) -- cgit v1.2.3