From 9a51ca0a782764c97c5c393b799ff76b7b6fb75f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 3 Jul 2019 22:59:29 -0700 Subject: Pass a span to BFormatDec::process --- Alc/bformatdec.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'Alc/bformatdec.cpp') diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp index 9c0c72ec..6ef398ec 100644 --- a/Alc/bformatdec.cpp +++ b/Alc/bformatdec.cpp @@ -146,12 +146,9 @@ BFormatDec::BFormatDec(const ALuint inchans, const ALsizei chancount, } -void BFormatDec::process(FloatBufferLine *OutBuffer, const ALuint OutChannels, +void BFormatDec::process(const al::span OutBuffer, const FloatBufferLine *InSamples, const ALsizei SamplesToDo) { - ASSUME(OutChannels > 0); - ASSUME(mNumChannels > 0); - if(mDualBand) { for(ALuint i{0};i < mNumChannels;i++) @@ -160,24 +157,30 @@ void BFormatDec::process(FloatBufferLine *OutBuffer, const ALuint OutChannels, const al::span hfsamples{mSamplesHF, mNumChannels}; const al::span lfsamples{mSamplesLF, mNumChannels}; - for(ALuint chan{0};chan < OutChannels;chan++) + ALfloat (*mixmtx)[sNumBands][MAX_AMBI_CHANNELS]{mMatrix.Dual}; + ALuint enabled{mEnabled}; + for(FloatBufferLine &outbuf : OutBuffer) { - if(UNLIKELY(!(mEnabled&(1<>= 1; } } else { const al::span insamples{InSamples, mNumChannels}; - for(ALuint chan{0};chan < OutChannels;chan++) + ALfloat (*mixmtx)[MAX_AMBI_CHANNELS]{mMatrix.Single}; + ALuint enabled{mEnabled}; + for(FloatBufferLine &outbuf : OutBuffer) { - if(UNLIKELY(!(mEnabled&(1<>= 1; } } } -- cgit v1.2.3