diff options
author | Chris Robinson <[email protected]> | 2019-05-29 21:58:37 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-29 21:58:37 -0700 |
commit | 893ffe9a84d497d38e6e472b0cffbd9c37e0c366 (patch) | |
tree | e86cb9f28857507a54aad958e8c4a9dd361c3e28 /Alc/effects/equalizer.cpp | |
parent | 8af7b4c6e0ddaf4d66455702a7ede0c9036f3825 (diff) |
Use span<FloatBufferLine> for MixSamples
Diffstat (limited to 'Alc/effects/equalizer.cpp')
-rw-r--r-- | Alc/effects/equalizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<FloatBufferLine> 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<ALfloat(&)[BUFFERSIZE]>(samplesOut[0]), mChans[c].CurrentGains, - mChans[c].TargetGains, samplesToDo, 0, samplesToDo); + MixSamples(mSampleBuffer, output, mChans[c].CurrentGains, mChans[c].TargetGains, + samplesToDo, 0, samplesToDo); } } |