From 619249371a40f03cf988d1f5750d643df797c485 Mon Sep 17 00:00:00 2001 From: Chris Robinson <chris.kcat@gmail.com> Date: Thu, 27 Jan 2022 04:04:41 -0800 Subject: Remove math_defs.h --- alc/effects/convolution.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'alc/effects/convolution.cpp') diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp index 10e3dd9d..196238fc 100644 --- a/alc/effects/convolution.cpp +++ b/alc/effects/convolution.cpp @@ -35,7 +35,6 @@ #include "core/fmt_traits.h" #include "core/mixer.h" #include "intrusive_ptr.h" -#include "math_defs.h" #include "polyphase_resampler.h" #include "vector.h" @@ -121,6 +120,10 @@ struct ChanMap { float elevation; }; +constexpr float Deg2Rad(float x) noexcept +{ return static_cast<float>(al::numbers::pi / 180.0 * x); } + + using complex_d = std::complex<double>; constexpr size_t ConvolveUpdateSize{256}; @@ -346,7 +349,7 @@ void ConvolutionState::update(const ContextBase *context, const EffectSlot *slot * to have its own output target since the main mixing buffer won't have an * LFE channel (due to being B-Format). */ - static const ChanMap MonoMap[1]{ + static constexpr ChanMap MonoMap[1]{ { FrontCenter, 0.0f, 0.0f } }, StereoMap[2]{ { FrontLeft, Deg2Rad(-45.0f), Deg2Rad(0.0f) }, -- cgit v1.2.3