diff options
author | Chris Robinson <[email protected]> | 2019-05-29 20:45:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-29 20:45:33 -0700 |
commit | 8af7b4c6e0ddaf4d66455702a7ede0c9036f3825 (patch) | |
tree | 9df078b080f990aa692163f8b832d3098e4d09da /Alc/bformatdec.cpp | |
parent | 7e6b6d7ad90f95fc95efefe7cdf996b8e2cb90fb (diff) |
Use FloatBufferLine and span<> for MixRowSamples
Diffstat (limited to 'Alc/bformatdec.cpp')
-rw-r--r-- | Alc/bformatdec.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp index 33659e04..5d9b3503 100644 --- a/Alc/bformatdec.cpp +++ b/Alc/bformatdec.cpp @@ -157,29 +157,26 @@ void BFormatDec::process(FloatBufferLine *OutBuffer, const ALsizei OutChannels, mXOver[i].process(mSamplesHF[i].data(), mSamplesLF[i].data(), InSamples[i].data(), SamplesToDo); + const al::span<const FloatBufferLine> hfsamples{mSamplesHF, mSamplesHF+mNumChannels}; + const al::span<const FloatBufferLine> lfsamples{mSamplesLF, mSamplesLF+mNumChannels}; for(ALsizei chan{0};chan < OutChannels;chan++) { if(UNLIKELY(!(mEnabled&(1<<chan)))) continue; - MixRowSamples(OutBuffer[chan].data(), mMatrix.Dual[chan][sHFBand], - &reinterpret_cast<const ALfloat(&)[BUFFERSIZE]>(mSamplesHF[0]), - mNumChannels, 0, SamplesToDo); - MixRowSamples(OutBuffer[chan].data(), mMatrix.Dual[chan][sLFBand], - &reinterpret_cast<const ALfloat(&)[BUFFERSIZE]>(mSamplesLF[0]), - mNumChannels, 0, SamplesToDo); + MixRowSamples(OutBuffer[chan], mMatrix.Dual[chan][sHFBand], hfsamples, 0, SamplesToDo); + MixRowSamples(OutBuffer[chan], mMatrix.Dual[chan][sLFBand], lfsamples, 0, SamplesToDo); } } else { + const al::span<const FloatBufferLine> insamples{InSamples, InSamples+mNumChannels}; for(ALsizei chan{0};chan < OutChannels;chan++) { if(UNLIKELY(!(mEnabled&(1<<chan)))) continue; - MixRowSamples(OutBuffer[chan].data(), mMatrix.Single[chan], - &reinterpret_cast<const ALfloat(&)[BUFFERSIZE]>(InSamples[0]), mNumChannels, 0, - SamplesToDo); + MixRowSamples(OutBuffer[chan], mMatrix.Single[chan], insamples, 0, SamplesToDo); } } } |