diff options
author | Chris Robinson <[email protected]> | 2019-10-25 01:43:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-10-25 01:43:23 -0700 |
commit | 0cba99ed1bc2712c15c17f0940127e6f84395729 (patch) | |
tree | c5898dc9022da86450204f71579723c41d54bc92 /al/source.cpp | |
parent | 5ac1f192419a5d1d435a0f8703560823075799af (diff) |
Avoid static constexpr for arrays iterated over at run-time
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/al/source.cpp b/al/source.cpp index 6d15f73a..8b8e6382 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -2808,20 +2808,18 @@ START_API_FUNC const ALuint *OrderFromChan; if(voice->mFmtChannels == FmtBFormat2D) { - static constexpr ALuint Order2DFromChan[MAX_AMBI2D_CHANNELS]{ - 0, 1,1, 2,2, 3,3 - }; + static const ALuint Order2DFromChan[MAX_AMBI2D_CHANNELS]{ + 0, 1,1, 2,2, 3,3,}; OrderFromChan = Order2DFromChan; } else { - static constexpr ALuint Order3DFromChan[MAX_AMBI_CHANNELS]{ - 0, 1,1,1, 2,2,2,2,2, 3,3,3,3,3,3,3, - }; + static const ALuint Order3DFromChan[MAX_AMBI_CHANNELS]{ + 0, 1,1,1, 2,2,2,2,2, 3,3,3,3,3,3,3,}; OrderFromChan = Order3DFromChan; } - BandSplitter splitter{400.0f / static_cast<ALfloat>(device->Frequency)}; + BandSplitter splitter{400.0f / static_cast<float>(device->Frequency)}; const auto scales = BFormatDec::GetHFOrderScales(1, device->mAmbiOrder); auto init_ambi = [scales,&OrderFromChan,&splitter](ALvoice::ChannelData &chandata) -> void |