Skip to content

Commit

Permalink
Use a span instead of an auto&& to array
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Sep 13, 2023
1 parent a7fc952 commit 2ea092d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions alc/alu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ea092d

Please sign in to comment.