diff options
author | Chris Robinson <[email protected]> | 2019-05-30 14:38:06 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-30 14:38:06 -0700 |
commit | a123c87ba5a0ba48490ba1f8cd859e557e9bbb62 (patch) | |
tree | ad8973349d82b875e34d856148a117721c25a619 /Alc | |
parent | 1c8dfb55d8147ea646d7049aa15b181f24ac6c76 (diff) |
Avoid some MSVC workarounds that didn't seem to work
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/effects/reverb.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index bb12826b..5361a58f 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -1189,7 +1189,7 @@ void VecAllpass::processFaded(const al::span<FloatBufferLine,NUM_LINES> samples, void EarlyReflection_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei todo, const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) { - const auto temps = al::span<FloatBufferLine,NUM_LINES>(State->mTempSamples); + const al::span<FloatBufferLine,NUM_LINES> temps{State->mTempSamples}; const DelayLineI early_delay{State->mEarly.Delay}; const DelayLineI main_delay{State->mDelay}; const ALfloat mixX{State->mMixX}; @@ -1246,13 +1246,12 @@ 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}; - VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, - {out.cbegin(), out.cend()}, todo); + 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, const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) { - const auto temps = al::span<FloatBufferLine,NUM_LINES>(State->mTempSamples); + const al::span<FloatBufferLine,NUM_LINES> temps{State->mTempSamples}; const DelayLineI early_delay{State->mEarly.Delay}; const DelayLineI main_delay{State->mDelay}; const ALfloat mixX{State->mMixX}; @@ -1318,8 +1317,7 @@ 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}; - VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, - {out.cbegin(), out.cend()}, todo); + VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, out, todo); } /* This generates the reverb tail using a modified feed-back delay network @@ -1339,7 +1337,7 @@ void EarlyReflection_Faded(ReverbState *State, const ALsizei offset, const ALsiz void LateReverb_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei todo, const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) { - const auto temps = al::span<FloatBufferLine,NUM_LINES>(State->mTempSamples); + const al::span<FloatBufferLine,NUM_LINES> temps{State->mTempSamples}; const DelayLineI late_delay{State->mLate.Delay}; const DelayLineI main_delay{State->mDelay}; const ALfloat mixX{State->mMixX}; @@ -1381,13 +1379,12 @@ void LateReverb_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei std::copy_n(temps[j].begin(), todo, out[j].begin()+base); /* Finally, scatter and bounce the results to refeed the feedback buffer. */ - VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, - {out.cbegin(), out.cend()}, todo); + VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, out, todo); } void LateReverb_Faded(ReverbState *State, const ALsizei offset, const ALsizei todo, const ALfloat fade, const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) { - const auto temps = al::span<FloatBufferLine,NUM_LINES>(State->mTempSamples); + const al::span<FloatBufferLine,NUM_LINES> temps{State->mTempSamples}; const DelayLineI late_delay{State->mLate.Delay}; const DelayLineI main_delay{State->mDelay}; const ALfloat mixX{State->mMixX}; @@ -1442,8 +1439,7 @@ void LateReverb_Faded(ReverbState *State, const ALsizei offset, const ALsizei to for(ALsizei j{0};j < NUM_LINES;j++) std::copy_n(temps[j].begin(), todo, out[j].begin()+base); - VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, - {out.cbegin(), out.cend()}, todo); + VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, out, todo); } void ReverbState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, const al::span<FloatBufferLine> samplesOut) @@ -1453,7 +1449,7 @@ void ReverbState::process(const ALsizei samplesToDo, const FloatBufferLine *REST ASSUME(samplesToDo > 0); /* Convert B-Format to A-Format for processing. */ - auto &afmt = mTempSamples; + const al::span<FloatBufferLine,NUM_LINES> afmt{mTempSamples}; for(ALsizei c{0};c < NUM_LINES;c++) { std::fill_n(afmt[c].begin(), samplesToDo, 0.0f); |