diff options
author | Chris Robinson <[email protected]> | 2019-05-29 22:31:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-29 22:31:36 -0700 |
commit | 2909f263fd1a2e7122b0345c6d11209084815fd1 (patch) | |
tree | 43fc5530d46f50edd7e5ca95f9c2d3dd4c95d3fc /Alc/effects/pshifter.cpp | |
parent | 893ffe9a84d497d38e6e472b0cffbd9c37e0c366 (diff) |
Use span<FloatBufferLine> for EffectState::process output
Diffstat (limited to 'Alc/effects/pshifter.cpp')
-rw-r--r-- | Alc/effects/pshifter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index 34f442bc..184c9a40 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -153,7 +153,7 @@ struct PshifterState 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(PshifterState) }; @@ -197,7 +197,7 @@ void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot ComputePanGains(target.Main, coeffs, slot->Params.Gain, mTargetGains); } -void PshifterState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei /*numInput*/, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput) +void PshifterState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei /*numInput*/, const al::span<FloatBufferLine> samplesOut) { /* Pitch shifter engine based on the work of Stephan Bernsee. * http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/ @@ -321,8 +321,8 @@ void PshifterState::process(const ALsizei samplesToDo, const FloatBufferLine *RE mCount = count; /* Now, mix the processed sound data to the output. */ - MixSamples(bufferOut, {samplesOut, samplesOut+numOutput}, mCurrentGains, mTargetGains, - maxi(samplesToDo, 512), 0, samplesToDo); + MixSamples(bufferOut, samplesOut, mCurrentGains, mTargetGains, maxi(samplesToDo, 512), 0, + samplesToDo); } |