diff options
author | Chris Robinson <[email protected]> | 2019-08-20 04:16:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-20 04:16:44 -0700 |
commit | 102ef6cb3356ef81e2a392d3aa8bd6324eb3ff30 (patch) | |
tree | 2f661c63be78c7f611665b2fb5a29ff58813b543 /alc/effects/chorus.cpp | |
parent | 4883091f5de278b7469790efa466df5d93d465b0 (diff) |
Pass a span for the Mix function's input
Diffstat (limited to 'alc/effects/chorus.cpp')
-rw-r--r-- | alc/effects/chorus.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp index 5966d3bd..7b43962c 100644 --- a/alc/effects/chorus.cpp +++ b/alc/effects/chorus.cpp @@ -218,9 +218,8 @@ void ChorusState::process(const ALsizei samplesToDo, const FloatBufferLine *REST for(ALsizei base{0};base < samplesToDo;) { const ALsizei todo = mini(256, samplesToDo-base); - ALint moddelays[2][256]; - alignas(16) ALfloat temps[2][256]; + ALint moddelays[2][256]; if(mWaveform == WaveForm::Sinusoid) { GetSinusoidDelays(moddelays[0], mLfoOffset, mLfoRange, mLfoScale, mDepth, mDelay, @@ -237,6 +236,7 @@ void ChorusState::process(const ALsizei samplesToDo, const FloatBufferLine *REST } mLfoOffset = (mLfoOffset+todo) % mLfoRange; + alignas(16) ALfloat temps[2][256]; for(ALsizei i{0};i < todo;i++) { // Feed the buffer's input first (necessary for delays < 1). @@ -262,8 +262,8 @@ void ChorusState::process(const ALsizei samplesToDo, const FloatBufferLine *REST } for(ALsizei c{0};c < 2;c++) - MixSamples(temps[c], samplesOut, mGains[c].Current, mGains[c].Target, samplesToDo-base, - base, todo); + MixSamples({temps[c], temps[c]+todo}, samplesOut, mGains[c].Current, mGains[c].Target, + samplesToDo-base, base); base += todo; } |