aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/bformatdec.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-17 14:03:21 -0700
committerChris Robinson <[email protected]>2019-03-17 14:03:21 -0700
commitd802a5785eb2dd1c7cd1fe60810734cf1dddf29c (patch)
tree57746195a87c7615bd31a64ba231309c6007e58e /Alc/bformatdec.cpp
parentf96c37120b0cba7b013a761138b04f5adb06738a (diff)
Fix indexing for basic B-Format decoding
Diffstat (limited to 'Alc/bformatdec.cpp')
-rw-r--r--Alc/bformatdec.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp
index a54e8c42..fe943d9d 100644
--- a/Alc/bformatdec.cpp
+++ b/Alc/bformatdec.cpp
@@ -143,11 +143,12 @@ void BFormatDec::reset(const ALsizei inchans, const ALsizei chancount,
{ return mask | (1 << chan); }
);
- auto set_coeffs = [this,inchans,&chancoeffs](const ALsizei chanidx) noexcept -> void
+ const ChannelDec *incoeffs{chancoeffs};
+ auto set_coeffs = [this,inchans,&incoeffs](const ALsizei chanidx) noexcept -> void
{
ASSUME(chanidx >= 0);
- const ALfloat (&coeffs)[MAX_AMBI_CHANNELS] = chancoeffs[chanidx];
ALfloat (&mtx)[MAX_AMBI_CHANNELS] = mMatrix.Single[chanidx];
+ const ALfloat (&coeffs)[MAX_AMBI_CHANNELS] = *(incoeffs++);
ASSUME(inchans > 0);
std::copy_n(std::begin(coeffs), inchans, std::begin(mtx));