diff options
author | Chris Robinson <[email protected]> | 2019-03-17 14:03:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-03-17 14:03:21 -0700 |
commit | d802a5785eb2dd1c7cd1fe60810734cf1dddf29c (patch) | |
tree | 57746195a87c7615bd31a64ba231309c6007e58e /Alc/bformatdec.cpp | |
parent | f96c37120b0cba7b013a761138b04f5adb06738a (diff) |
Fix indexing for basic B-Format decoding
Diffstat (limited to 'Alc/bformatdec.cpp')
-rw-r--r-- | Alc/bformatdec.cpp | 5 |
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)); |