Avoid some MSVC workarounds that didn't seem to work

This commit is contained in:
Chris Robinson 2019-05-30 14:38:06 -07:00
parent 1c8dfb55d8
commit a123c87ba5

View File

@ -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, void EarlyReflection_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei todo,
const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) 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 early_delay{State->mEarly.Delay};
const DelayLineI main_delay{State->mDelay}; const DelayLineI main_delay{State->mDelay};
const ALfloat mixX{State->mMixX}; 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. * bounce to improve the initial diffusion in the late reverb.
*/ */
const ALsizei late_feed_tap{offset - State->mLateFeedTap}; const ALsizei late_feed_tap{offset - State->mLateFeedTap};
VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, out, todo);
{out.cbegin(), out.cend()}, todo);
} }
void EarlyReflection_Faded(ReverbState *State, const ALsizei offset, const ALsizei 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 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 early_delay{State->mEarly.Delay};
const DelayLineI main_delay{State->mDelay}; const DelayLineI main_delay{State->mDelay};
const ALfloat mixX{State->mMixX}; 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); early_delay.write(offset, NUM_LINES-1-j, temps[j].data(), todo);
const ALsizei late_feed_tap{offset - State->mLateFeedTap}; const ALsizei late_feed_tap{offset - State->mLateFeedTap};
VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, VectorScatterRevDelayIn(main_delay, late_feed_tap, mixX, mixY, base, out, todo);
{out.cbegin(), out.cend()}, todo);
} }
/* This generates the reverb tail using a modified feed-back delay network /* 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, void LateReverb_Unfaded(ReverbState *State, const ALsizei offset, const ALsizei todo,
const ALsizei base, const al::span<FloatBufferLine,NUM_LINES> out) 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 late_delay{State->mLate.Delay};
const DelayLineI main_delay{State->mDelay}; const DelayLineI main_delay{State->mDelay};
const ALfloat mixX{State->mMixX}; 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); std::copy_n(temps[j].begin(), todo, out[j].begin()+base);
/* Finally, scatter and bounce the results to refeed the feedback buffer. */ /* Finally, scatter and bounce the results to refeed the feedback buffer. */
VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, out, todo);
{out.cbegin(), out.cend()}, todo);
} }
void LateReverb_Faded(ReverbState *State, const ALsizei offset, const ALsizei 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 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 late_delay{State->mLate.Delay};
const DelayLineI main_delay{State->mDelay}; const DelayLineI main_delay{State->mDelay};
const ALfloat mixX{State->mMixX}; 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++) for(ALsizei j{0};j < NUM_LINES;j++)
std::copy_n(temps[j].begin(), todo, out[j].begin()+base); std::copy_n(temps[j].begin(), todo, out[j].begin()+base);
VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, VectorScatterRevDelayIn(late_delay, offset, mixX, mixY, base, out, todo);
{out.cbegin(), out.cend()}, todo);
} }
void ReverbState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, const al::span<FloatBufferLine> samplesOut) 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); ASSUME(samplesToDo > 0);
/* Convert B-Format to A-Format for processing. */ /* 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++) for(ALsizei c{0};c < NUM_LINES;c++)
{ {
std::fill_n(afmt[c].begin(), samplesToDo, 0.0f); std::fill_n(afmt[c].begin(), samplesToDo, 0.0f);