From 893ffe9a84d497d38e6e472b0cffbd9c37e0c366 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 29 May 2019 21:58:37 -0700 Subject: Use span for MixSamples --- Alc/effects/equalizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/effects/equalizer.cpp') diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index 53f8e153..f6be258b 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -160,6 +160,7 @@ void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, void EqualizerState::process(const ALsizei samplesToDo, const FloatBufferLine *RESTRICT samplesIn, const ALsizei numInput, FloatBufferLine *RESTRICT samplesOut, const ALsizei numOutput) { + const al::span output{samplesOut, samplesOut+numOutput}; ASSUME(numInput > 0); for(ALsizei c{0};c < numInput;c++) { @@ -168,9 +169,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, numOutput, - &reinterpret_cast(samplesOut[0]), mChans[c].CurrentGains, - mChans[c].TargetGains, samplesToDo, 0, samplesToDo); + MixSamples(mSampleBuffer, output, mChans[c].CurrentGains, mChans[c].TargetGains, + samplesToDo, 0, samplesToDo); } } -- cgit v1.2.3