aboutsummaryrefslogtreecommitdiffstats
path: root/alc/bformatdec.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-01-15 10:45:08 -0800
committerChris Robinson <[email protected]>2020-01-15 10:45:08 -0800
commit32c9dbd7ff9bae89ddf876590b938d2932fe609f (patch)
treeb80a5f5e88dda580c29ee4a151b29e5c2ecca23d /alc/bformatdec.cpp
parent6a8c6eae6f72a31bca2a04e94bc3bc16e10a83be (diff)
Avoid an extraneous index map
Diffstat (limited to 'alc/bformatdec.cpp')
-rw-r--r--alc/bformatdec.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/alc/bformatdec.cpp b/alc/bformatdec.cpp
index 3ef2fec0..6c9a6be4 100644
--- a/alc/bformatdec.cpp
+++ b/alc/bformatdec.cpp
@@ -98,17 +98,14 @@ BFormatDec::BFormatDec(const AmbDecConf *conf, const bool allow_2band, const ALu
}
}
-BFormatDec::BFormatDec(const ALuint inchans, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS],
- const al::span<const ALuint> chanmap) : mChannelDec{inchans}
+BFormatDec::BFormatDec(const ALuint inchans, const al::span<const ChannelDec> chancoeffs)
+ : mChannelDec{inchans}
{
for(size_t j{0};j < mChannelDec.size();++j)
{
- const ChannelDec *incoeffs{chancoeffs};
- for(const ALuint chanidx : chanmap)
- {
- mChannelDec[j].mGains.Single[chanidx] = (*incoeffs)[j];
- ++incoeffs;
- }
+ float *outcoeffs{mChannelDec[j].mGains.Single};
+ for(const ChannelDec &incoeffs : chancoeffs)
+ *(outcoeffs++) = incoeffs[j];
}
}