aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-01-04 00:04:55 -0800
committerChris Robinson <[email protected]>2020-01-04 00:04:55 -0800
commita42a586f0fbea0f84fc6b16f41fe705c1a8b83c0 (patch)
treef5b8fe2f78f4f4e638a1d10b1176e2167c3f38d3 /alc
parent8b3a1ed9e44f0e8ed4266eb62f50a6d7d8c4184b (diff)
Avoid a duplicate array
Diffstat (limited to 'alc')
-rw-r--r--alc/ambidefs.h5
-rw-r--r--alc/panning.cpp9
2 files changed, 4 insertions, 10 deletions
diff --git a/alc/ambidefs.h b/alc/ambidefs.h
index 4b6d80f6..a38c4900 100644
--- a/alc/ambidefs.h
+++ b/alc/ambidefs.h
@@ -120,11 +120,6 @@ struct AmbiIndex {
static constexpr std::array<uint8_t,MAX_AMBI2D_CHANNELS> From2D{{
0, 1,3, 4,8, 9,15
}};
-
- static constexpr std::array<uint8_t,MAX_AMBI_CHANNELS> From3D{{
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15
- }};
};
#endif /* AMBIDEFS_H */
diff --git a/alc/panning.cpp b/alc/panning.cpp
index ba71bcd9..a934b58a 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -65,7 +65,6 @@ constexpr std::array<uint8_t,MAX_AMBI_CHANNELS> AmbiIndex::FromFuMa;
constexpr std::array<uint8_t,MAX_AMBI2D_CHANNELS> AmbiIndex::FromFuMa2D;
constexpr std::array<uint8_t,MAX_AMBI_CHANNELS> AmbiIndex::FromACN;
constexpr std::array<uint8_t,MAX_AMBI2D_CHANNELS> AmbiIndex::From2D;
-constexpr std::array<uint8_t,MAX_AMBI_CHANNELS> AmbiIndex::From3D;
namespace {
@@ -486,7 +485,7 @@ void InitCustomPanning(ALCdevice *device, bool hqdec, const AmbDecConf *conf,
if((conf->ChanMask&AMBI_PERIPHONIC_MASK))
{
count = static_cast<ALuint>(AmbiChannelsFromOrder(order));
- std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+count,
+ std::transform(AmbiIndex::FromACN.begin(), AmbiIndex::FromACN.begin()+count,
std::begin(device->Dry.AmbiMap),
[](const uint8_t &index) noexcept { return BFChannelConfig{1.0f, index}; }
);
@@ -664,7 +663,7 @@ void InitHrtfPanning(ALCdevice *device)
const size_t count{AmbiChannelsFromOrder(ambi_order)};
device->mHrtfState = DirectHrtfState::Create(count);
- std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+count,
+ std::transform(AmbiIndex::FromACN.begin(), AmbiIndex::FromACN.begin()+count,
std::begin(device->Dry.AmbiMap),
[](const uint8_t &index) noexcept { return BFChannelConfig{1.0f, index}; }
);
@@ -889,8 +888,8 @@ void aluInitEffectPanning(ALeffectslot *slot, ALCdevice *device)
slot->MixBuffer.resize(count);
slot->MixBuffer.shrink_to_fit();
- auto acnmap_end = AmbiIndex::From3D.begin() + count;
- auto iter = std::transform(AmbiIndex::From3D.begin(), acnmap_end, slot->Wet.AmbiMap.begin(),
+ auto acnmap_end = AmbiIndex::FromACN.begin() + count;
+ auto iter = std::transform(AmbiIndex::FromACN.begin(), acnmap_end, slot->Wet.AmbiMap.begin(),
[](const uint8_t &acn) noexcept -> BFChannelConfig
{ return BFChannelConfig{1.0f, acn}; }
);