aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/modulator.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-05-29 09:37:25 -0700
committerChris Robinson <[email protected]>2019-05-29 09:37:25 -0700
commitec3a6f8cded70aeb54e9c658fa68a680c017e1ef (patch)
treeba1d289c58645040cf0aaccaf6405dae8a87c414 /Alc/effects/modulator.cpp
parentb923eb187991a8db56fd23cffa70f946ce24c1ff (diff)
Use FloatBufferLine for the effect process method
Diffstat (limited to 'Alc/effects/modulator.cpp')
-rw-r--r--Alc/effects/modulator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp
index f926cb87..ec0b6184 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(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override;
+ void process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput) override;
DEF_NEWDEL(ModulatorState)
};
@@ -141,7 +141,7 @@ void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot,
}
}
-void ModulatorState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput)
+void ModulatorState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput)
{
const ALsizei step = mStep;
ALsizei base;
@@ -165,8 +165,8 @@ void ModulatorState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl
for(i = 0;i < td;i++)
temps[i] *= modsamples[i];
- MixSamples(temps, numOutput, samplesOut, mChans[c].CurrentGains,
- mChans[c].TargetGains, samplesToDo-base, base, td);
+ MixSamples(temps, numOutput, &reinterpret_cast<ALfloat(&)[BUFFERSIZE]>(samplesOut[0]),
+ mChans[c].CurrentGains, mChans[c].TargetGains, samplesToDo-base, base, td);
}
base += td;