aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/modulator.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-05-29 22:31:36 -0700
committerChris Robinson <[email protected]>2019-05-29 22:31:36 -0700
commit2909f263fd1a2e7122b0345c6d11209084815fd1 (patch)
tree43fc5530d46f50edd7e5ca95f9c2d3dd4c95d3fc /Alc/effects/modulator.cpp
parent893ffe9a84d497d38e6e472b0cffbd9c37e0c366 (diff)
Use span<FloatBufferLine> for EffectState::process output
Diffstat (limited to 'Alc/effects/modulator.cpp')
-rw-r--r--Alc/effects/modulator.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp
index 9b7abbb7..60728d2e 100644
--- a/Alc/effects/modulator.cpp
+++ b/Alc/effects/modulator.cpp
@@ -93,7 +93,7 @@ struct ModulatorState final : public EffectState {
ALboolean deviceUpdate(const ALCdevice *device) override;
void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override;
- void process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput) override;
+ void process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, const al::span<FloatBufferLine> samplesOut) override;
DEF_NEWDEL(ModulatorState)
};
@@ -141,11 +141,10 @@ void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot,
}
}
-void ModulatorState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput)
+void ModulatorState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, const al::span<FloatBufferLine> samplesOut)
{
const ALsizei step{mStep};
- const al::span<FloatBufferLine> output{samplesOut, samplesOut+numOutput};
for(ALsizei base{0};base < samplesToDo;)
{
alignas(16) ALfloat modsamples[MAX_UPDATE_SAMPLES];
@@ -165,7 +164,7 @@ void ModulatorState::process(const ALsizei samplesToDo, const FloatBufferLine *R
for(i = 0;i < td;i++)
temps[i] *= modsamples[i];
- MixSamples(temps, output, mChans[c].CurrentGains, mChans[c].TargetGains,
+ MixSamples(temps, samplesOut, mChans[c].CurrentGains, mChans[c].TargetGains,
samplesToDo-base, base, td);
}