diff options
author | Chris Robinson <[email protected]> | 2023-09-14 07:31:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-09-14 07:31:25 -0700 |
commit | f098f253324d4d9b0669e061fab006295d826a53 (patch) | |
tree | 6dada40a46c7b774be224eacaebd6ac64cec1b5c /alc/effects/fshifter.cpp | |
parent | 2ea092d6ad43c636713f53532d7e68bd5444b91d (diff) |
Store channel positions as vectors instead of angles
To avoid extraneous conversions between angles and vectors
Diffstat (limited to 'alc/effects/fshifter.cpp')
-rw-r--r-- | alc/effects/fshifter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp index 3e6a7385..ec0cc29f 100644 --- a/alc/effects/fshifter.cpp +++ b/alc/effects/fshifter.cpp @@ -164,10 +164,10 @@ void FshifterState::update(const ContextBase *context, const EffectSlot *slot, } static constexpr auto inv_sqrt2 = static_cast<float>(1.0 / al::numbers::sqrt2); - static constexpr auto lcoeffs_pw = CalcDirectionCoeffs({-1.0f, 0.0f, 0.0f}); - static constexpr auto rcoeffs_pw = CalcDirectionCoeffs({ 1.0f, 0.0f, 0.0f}); - static constexpr auto lcoeffs_nrml = CalcDirectionCoeffs({-inv_sqrt2, 0.0f, inv_sqrt2}); - static constexpr auto rcoeffs_nrml = CalcDirectionCoeffs({ inv_sqrt2, 0.0f, inv_sqrt2}); + static constexpr auto lcoeffs_pw = CalcDirectionCoeffs(std::array{-1.0f, 0.0f, 0.0f}); + static constexpr auto rcoeffs_pw = CalcDirectionCoeffs(std::array{ 1.0f, 0.0f, 0.0f}); + static constexpr auto lcoeffs_nrml = CalcDirectionCoeffs(std::array{-inv_sqrt2, 0.0f, inv_sqrt2}); + static constexpr auto rcoeffs_nrml = CalcDirectionCoeffs(std::array{ inv_sqrt2, 0.0f, inv_sqrt2}); auto &lcoeffs = (device->mRenderMode != RenderMode::Pairwise) ? lcoeffs_nrml : lcoeffs_pw; auto &rcoeffs = (device->mRenderMode != RenderMode::Pairwise) ? rcoeffs_nrml : rcoeffs_pw; |