aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
diff options
context:
space:
mode:
Diffstat (limited to 'alc/effects')
-rw-r--r--alc/effects/autowah.cpp4
-rw-r--r--alc/effects/chorus.cpp8
-rw-r--r--alc/effects/dedicated.cpp4
-rw-r--r--alc/effects/echo.cpp4
-rw-r--r--alc/effects/equalizer.cpp4
-rw-r--r--alc/effects/fshifter.cpp4
-rw-r--r--alc/effects/modulator.cpp4
-rw-r--r--alc/effects/pshifter.cpp4
-rw-r--r--alc/effects/reverb.cpp20
-rw-r--r--alc/effects/vmorpher.cpp11
10 files changed, 33 insertions, 34 deletions
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp
index f16c5ba5..10d69b6c 100644
--- a/alc/effects/autowah.cpp
+++ b/alc/effects/autowah.cpp
@@ -190,8 +190,8 @@ void ALautowahState::process(const ALsizei samplesToDo, const FloatBufferLine *R
mChans[c].Filter.z2 = z2;
/* Now, mix the processed sound data to the output. */
- MixSamples(mBufferOut, samplesOut, mChans[c].CurrentGains, mChans[c].TargetGains,
- samplesToDo, 0, samplesToDo);
+ MixSamples({mBufferOut, mBufferOut+samplesToDo}, samplesOut, mChans[c].CurrentGains,
+ mChans[c].TargetGains, samplesToDo, 0);
}
}
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;
}
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index 2e49658f..dc5e8527 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -88,8 +88,8 @@ void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const E
void DedicatedState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei /*numInput*/, const al::span<FloatBufferLine> samplesOut)
{
- MixSamples(samplesIn[0].data(), samplesOut, mCurrentGains, mTargetGains, samplesToDo, 0,
- samplesToDo);
+ MixSamples({samplesIn[0].data(), samplesIn[0].data()+samplesToDo}, samplesOut, mCurrentGains,
+ mTargetGains, samplesToDo, 0);
}
diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp
index d41c4f67..57279005 100644
--- a/alc/effects/echo.cpp
+++ b/alc/effects/echo.cpp
@@ -156,8 +156,8 @@ void EchoState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRI
mOffset = offset;
for(ALsizei c{0};c < 2;c++)
- MixSamples(mTempBuffer[c], samplesOut, mGains[c].Current, mGains[c].Target, samplesToDo, 0,
- samplesToDo);
+ MixSamples({mTempBuffer[c], mTempBuffer[c]+samplesToDo}, samplesOut, mGains[c].Current,
+ mGains[c].Target, samplesToDo, 0);
}
diff --git a/alc/effects/equalizer.cpp b/alc/effects/equalizer.cpp
index 12183814..27de12ad 100644
--- a/alc/effects/equalizer.cpp
+++ b/alc/effects/equalizer.cpp
@@ -167,8 +167,8 @@ void EqualizerState::process(const ALsizei samplesToDo, const FloatBufferLine *R
mChans[c].filter[2].process(mSampleBuffer, mSampleBuffer, samplesToDo);
mChans[c].filter[3].process(mSampleBuffer, mSampleBuffer, samplesToDo);
- MixSamples(mSampleBuffer, samplesOut, mChans[c].CurrentGains, mChans[c].TargetGains,
- samplesToDo, 0, samplesToDo);
+ MixSamples({mSampleBuffer, mSampleBuffer+samplesToDo}, samplesOut, mChans[c].CurrentGains,
+ mChans[c].TargetGains, samplesToDo, 0);
}
}
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp
index 7688c762..638325ec 100644
--- a/alc/effects/fshifter.cpp
+++ b/alc/effects/fshifter.cpp
@@ -222,8 +222,8 @@ void FshifterState::process(const ALsizei samplesToDo, const FloatBufferLine *RE
}
/* Now, mix the processed sound data to the output. */
- MixSamples(BufferOut, samplesOut, mGains[c].Current, mGains[c].Target,
- maxi(samplesToDo, 512), 0, samplesToDo);
+ MixSamples({BufferOut, BufferOut+samplesToDo}, samplesOut, mGains[c].Current,
+ mGains[c].Target, maxi(samplesToDo, 512), 0);
}
}
diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp
index 8a6378cd..48022e15 100644
--- a/alc/effects/modulator.cpp
+++ b/alc/effects/modulator.cpp
@@ -160,8 +160,8 @@ void ModulatorState::process(const ALsizei samplesToDo, const FloatBufferLine *R
for(i = 0;i < td;i++)
temps[i] *= modsamples[i];
- MixSamples(temps, samplesOut, mChans[c].CurrentGains, mChans[c].TargetGains,
- samplesToDo-base, base, td);
+ MixSamples({temps, temps+td}, samplesOut, mChans[c].CurrentGains,
+ mChans[c].TargetGains, samplesToDo-base, base);
}
base += td;
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index 0ba0b496..e1181fe7 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -285,8 +285,8 @@ void PshifterState::process(const ALsizei samplesToDo, const FloatBufferLine *RE
mCount = count;
/* Now, mix the processed sound data to the output. */
- MixSamples(bufferOut, samplesOut, mCurrentGains, mTargetGains, maxi(samplesToDo, 512), 0,
- samplesToDo);
+ MixSamples({bufferOut, bufferOut+samplesToDo}, samplesOut, mCurrentGains, mTargetGains,
+ maxi(samplesToDo, 512), 0);
}
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 5f8daabe..1e5cb861 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -427,16 +427,16 @@ struct ReverbState final : public EffectState {
std::fill(tmpspan.begin(), tmpspan.end(), 0.0f);
MixRowSamples(tmpspan, {A2B[c], NUM_LINES}, mEarlySamples[0].data(),
mEarlySamples[0].size());
- MixSamples(mTempLine.data(), samplesOut, mEarly.CurrentGain[c],
- mEarly.PanGain[c], counter, offset, todo);
+ MixSamples(tmpspan, samplesOut, mEarly.CurrentGain[c], mEarly.PanGain[c], counter,
+ offset);
}
for(size_t c{0u};c < NUM_LINES;c++)
{
std::fill(tmpspan.begin(), tmpspan.end(), 0.0f);
MixRowSamples(tmpspan, {A2B[c], NUM_LINES}, mLateSamples[0].data(),
mLateSamples[0].size());
- MixSamples(mTempLine.data(), samplesOut, mLate.CurrentGain[c], mLate.PanGain[c],
- counter, offset, todo);
+ MixSamples(tmpspan, samplesOut, mLate.CurrentGain[c], mLate.PanGain[c], counter,
+ offset);
}
}
@@ -456,10 +456,10 @@ struct ReverbState final : public EffectState {
* higher-order output.
*/
const ALfloat hfscale{(c==0) ? mOrderScales[0] : mOrderScales[1]};
- mAmbiSplitter[0][c].applyHfScale(mTempLine.data(), hfscale, todo);
+ mAmbiSplitter[0][c].applyHfScale(tmpspan.data(), hfscale, todo);
- MixSamples(mTempLine.data(), samplesOut, mEarly.CurrentGain[c],
- mEarly.PanGain[c], counter, offset, todo);
+ MixSamples(tmpspan, samplesOut, mEarly.CurrentGain[c], mEarly.PanGain[c], counter,
+ offset);
}
for(size_t c{0u};c < NUM_LINES;c++)
{
@@ -468,10 +468,10 @@ struct ReverbState final : public EffectState {
mLateSamples[0].size());
const ALfloat hfscale{(c==0) ? mOrderScales[0] : mOrderScales[1]};
- mAmbiSplitter[1][c].applyHfScale(mTempLine.data(), hfscale, todo);
+ mAmbiSplitter[1][c].applyHfScale(tmpspan.data(), hfscale, todo);
- MixSamples(mTempLine.data(), samplesOut, mLate.CurrentGain[c], mLate.PanGain[c],
- counter, offset, todo);
+ MixSamples(tmpspan, samplesOut, mLate.CurrentGain[c], mLate.PanGain[c], counter,
+ offset);
}
}
diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp
index bf144abb..1f796786 100644
--- a/alc/effects/vmorpher.cpp
+++ b/alc/effects/vmorpher.cpp
@@ -279,14 +279,13 @@ void VmorpherState::process(const ALsizei samplesToDo, const FloatBufferLine *RE
vowelB[2].process(&samplesIn[c][base], mSampleBufferB, td);
vowelB[3].process(&samplesIn[c][base], mSampleBufferB, td);
- alignas(16) ALfloat samplesBlended[MAX_UPDATE_SAMPLES];
-
- for (ALsizei i{0};i < td;i++)
- samplesBlended[i] = lerp(mSampleBufferA[i], mSampleBufferB[i], lfo[i]);
+ alignas(16) ALfloat blended[MAX_UPDATE_SAMPLES];
+ for(ALsizei i{0};i < td;i++)
+ blended[i] = lerp(mSampleBufferA[i], mSampleBufferB[i], lfo[i]);
/* Now, mix the processed sound data to the output. */
- MixSamples(samplesBlended, samplesOut, mChans[c].CurrentGains, mChans[c].TargetGains,
- samplesToDo-base, base, td);
+ MixSamples({blended, blended+td}, samplesOut, mChans[c].CurrentGains,
+ mChans[c].TargetGains, samplesToDo-base, base);
}
base += td;