aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/convolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/effects/convolution.cpp')
-rw-r--r--alc/effects/convolution.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 04b88f66..bc25963e 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -93,28 +93,28 @@ void LoadSamples(float *RESTRICT dst, const std::byte *src, const size_t srcstep
}
-inline auto& GetAmbiScales(AmbiScaling scaletype) noexcept
+constexpr auto GetAmbiScales(AmbiScaling scaletype) noexcept
{
switch(scaletype)
{
- case AmbiScaling::FuMa: return AmbiScale::FromFuMa();
- case AmbiScaling::SN3D: return AmbiScale::FromSN3D();
- case AmbiScaling::UHJ: return AmbiScale::FromUHJ();
+ case AmbiScaling::FuMa: return al::span{AmbiScale::FromFuMa};
+ case AmbiScaling::SN3D: return al::span{AmbiScale::FromSN3D};
+ case AmbiScaling::UHJ: return al::span{AmbiScale::FromUHJ};
case AmbiScaling::N3D: break;
}
- return AmbiScale::FromN3D();
+ return al::span{AmbiScale::FromN3D};
}
-inline auto& GetAmbiLayout(AmbiLayout layouttype) noexcept
+constexpr auto GetAmbiLayout(AmbiLayout layouttype) noexcept
{
- if(layouttype == AmbiLayout::FuMa) return AmbiIndex::FromFuMa();
- return AmbiIndex::FromACN();
+ if(layouttype == AmbiLayout::FuMa) return al::span{AmbiIndex::FromFuMa};
+ return al::span{AmbiIndex::FromACN};
}
-inline auto& GetAmbi2DLayout(AmbiLayout layouttype) noexcept
+constexpr auto GetAmbi2DLayout(AmbiLayout layouttype) noexcept
{
- if(layouttype == AmbiLayout::FuMa) return AmbiIndex::FromFuMa2D();
- return AmbiIndex::FromACN2D();
+ if(layouttype == AmbiLayout::FuMa) return al::span{AmbiIndex::FromFuMa2D};
+ return al::span{AmbiIndex::FromACN2D};
}
@@ -453,7 +453,7 @@ void ConvolutionState::update(const ContextBase *context, const EffectSlot *slot
}
mOutTarget = target.Main->Buffer;
- auto&& scales = GetAmbiScales(mAmbiScaling);
+ const auto scales = GetAmbiScales(mAmbiScaling);
const uint8_t *index_map{Is2DAmbisonic(mChannels) ?
GetAmbi2DLayout(mAmbiLayout).data() :
GetAmbiLayout(mAmbiLayout).data()};