aboutsummaryrefslogtreecommitdiffstats
path: root/alc/bformatdec.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-19 08:02:08 -0700
committerChris Robinson <[email protected]>2019-08-19 08:02:08 -0700
commit2d0568c0484fa5abc74b084c094a325adb0bc452 (patch)
treef89b04a772ef98625bdd8cb67ebcb4ef992e0819 /alc/bformatdec.cpp
parenta9223ae601c45c6bdc3c3001ce7b5f30141046b1 (diff)
Allow using a variable channel stride for MixRowSamples
Diffstat (limited to 'alc/bformatdec.cpp')
-rw-r--r--alc/bformatdec.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/bformatdec.cpp b/alc/bformatdec.cpp
index a241cc93..ce4c4b3b 100644
--- a/alc/bformatdec.cpp
+++ b/alc/bformatdec.cpp
@@ -156,16 +156,16 @@ void BFormatDec::process(const al::span<FloatBufferLine> OutBuffer,
mXOver[i].process(mSamplesHF[i].data(), mSamplesLF[i].data(), InSamples[i].data(),
SamplesToDo);
- const al::span<const FloatBufferLine> hfsamples{mSamplesHF, mNumChannels};
- const al::span<const FloatBufferLine> lfsamples{mSamplesLF, mNumChannels};
ALfloat (*mixmtx)[sNumBands][MAX_AMBI_CHANNELS]{mMatrix.Dual};
ALuint enabled{mEnabled};
for(FloatBufferLine &outbuf : OutBuffer)
{
if LIKELY(enabled&1)
{
- MixRowSamples(outbuf.data(), (*mixmtx)[sHFBand], hfsamples, 0, SamplesToDo);
- MixRowSamples(outbuf.data(), (*mixmtx)[sLFBand], lfsamples, 0, SamplesToDo);
+ MixRowSamples(outbuf.data(), {(*mixmtx)[sHFBand], mNumChannels},
+ mSamplesHF->data(), mSamplesHF->size(), SamplesToDo);
+ MixRowSamples(outbuf.data(), {(*mixmtx)[sLFBand], mNumChannels},
+ mSamplesLF->data(), mSamplesLF->size(), SamplesToDo);
}
++mixmtx;
enabled >>= 1;
@@ -173,13 +173,13 @@ void BFormatDec::process(const al::span<FloatBufferLine> OutBuffer,
}
else
{
- const al::span<const FloatBufferLine> insamples{InSamples, mNumChannels};
ALfloat (*mixmtx)[MAX_AMBI_CHANNELS]{mMatrix.Single};
ALuint enabled{mEnabled};
for(FloatBufferLine &outbuf : OutBuffer)
{
if LIKELY(enabled&1)
- MixRowSamples(outbuf.data(), *mixmtx, insamples, 0, SamplesToDo);
+ MixRowSamples(outbuf.data(), {*mixmtx, mNumChannels}, InSamples->data(),
+ InSamples->size(), SamplesToDo);
++mixmtx;
enabled >>= 1;
}