From 8fd90334a13608a781e36fc830cd79bf746edd42 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Aug 2019 00:27:28 -0700 Subject: Pass the MixRow buffer size as a span --- alc/bformatdec.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'alc/bformatdec.cpp') diff --git a/alc/bformatdec.cpp b/alc/bformatdec.cpp index ce4c4b3b..7d681bc6 100644 --- a/alc/bformatdec.cpp +++ b/alc/bformatdec.cpp @@ -162,10 +162,11 @@ void BFormatDec::process(const al::span OutBuffer, { if LIKELY(enabled&1) { - MixRowSamples(outbuf.data(), {(*mixmtx)[sHFBand], mNumChannels}, - mSamplesHF->data(), mSamplesHF->size(), SamplesToDo); - MixRowSamples(outbuf.data(), {(*mixmtx)[sLFBand], mNumChannels}, - mSamplesLF->data(), mSamplesLF->size(), SamplesToDo); + const al::span outspan{outbuf.data(), outbuf.data()+SamplesToDo}; + MixRowSamples(outspan, {(*mixmtx)[sHFBand], mNumChannels}, mSamplesHF->data(), + mSamplesHF->size()); + MixRowSamples(outspan, {(*mixmtx)[sLFBand], mNumChannels}, mSamplesLF->data(), + mSamplesLF->size()); } ++mixmtx; enabled >>= 1; @@ -178,8 +179,8 @@ void BFormatDec::process(const al::span OutBuffer, for(FloatBufferLine &outbuf : OutBuffer) { if LIKELY(enabled&1) - MixRowSamples(outbuf.data(), {*mixmtx, mNumChannels}, InSamples->data(), - InSamples->size(), SamplesToDo); + MixRowSamples({outbuf.data(), outbuf.data()+SamplesToDo}, {*mixmtx, mNumChannels}, + InSamples->data(), InSamples->size()); ++mixmtx; enabled >>= 1; } -- cgit v1.2.3