diff options
author | Chris Robinson <[email protected]> | 2023-09-13 06:06:14 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-09-13 06:06:14 -0700 |
commit | 2ea092d6ad43c636713f53532d7e68bd5444b91d (patch) | |
tree | a2e809b1d4d13ef7a85e6af478b9ba874016db25 /alc/alu.cpp | |
parent | a7fc952036668d6e6bdf7737cc13e92b4002259c (diff) |
Use a span instead of an auto&& to array
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index 8a4df3d4..b7df47e1 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -921,25 +921,25 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con { if(voice->mAmbiOrder == 1) { - auto&& upsampler = Is2DAmbisonic(voice->mFmtChannels) ? - AmbiScale::FirstOrder2DUp : AmbiScale::FirstOrderUp; + const auto upsampler = Is2DAmbisonic(voice->mFmtChannels) ? + al::span{AmbiScale::FirstOrder2DUp} : al::span{AmbiScale::FirstOrderUp}; UpsampleBFormatTransform(mixmatrix, upsampler, shrot, Device->mAmbiOrder); } else if(voice->mAmbiOrder == 2) { - auto&& upsampler = Is2DAmbisonic(voice->mFmtChannels) ? - AmbiScale::SecondOrder2DUp : AmbiScale::SecondOrderUp; + const auto upsampler = Is2DAmbisonic(voice->mFmtChannels) ? + al::span{AmbiScale::SecondOrder2DUp} : al::span{AmbiScale::SecondOrderUp}; UpsampleBFormatTransform(mixmatrix, upsampler, shrot, Device->mAmbiOrder); } else if(voice->mAmbiOrder == 3) { - auto&& upsampler = Is2DAmbisonic(voice->mFmtChannels) ? - AmbiScale::ThirdOrder2DUp : AmbiScale::ThirdOrderUp; + const auto upsampler = Is2DAmbisonic(voice->mFmtChannels) ? + al::span{AmbiScale::ThirdOrder2DUp} : al::span{AmbiScale::ThirdOrderUp}; UpsampleBFormatTransform(mixmatrix, upsampler, shrot, Device->mAmbiOrder); } else if(voice->mAmbiOrder == 4) { - auto&& upsampler = AmbiScale::FourthOrder2DUp; + const auto upsampler = al::span{AmbiScale::FourthOrder2DUp}; UpsampleBFormatTransform(mixmatrix, upsampler, shrot, Device->mAmbiOrder); } else |