diff options
author | Chris Robinson <[email protected]> | 2022-01-27 04:04:41 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-01-27 04:04:41 -0800 |
commit | 619249371a40f03cf988d1f5750d643df797c485 (patch) | |
tree | e16d0fdfc8e89004766be4d058d87c47f569a384 /alc/alu.cpp | |
parent | f8ac1ffe805b13c8b1cd2bc4d4a8362cbe1c2cbe (diff) |
Remove math_defs.h
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index dbf4dedf..13e36d6a 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -72,7 +72,6 @@ #include "core/voice.h" #include "core/voice_change.h" #include "intrusive_ptr.h" -#include "math_defs.h" #include "opthelpers.h" #include "ringbuffer.h" #include "strutils.h" @@ -678,6 +677,9 @@ void AmbiRotator(std::array<std::array<float,MaxAmbiChannels>,MaxAmbiChannels> & /* End ambisonic rotation helpers. */ +constexpr float Deg2Rad(float x) noexcept +{ return static_cast<float>(al::numbers::pi / 180.0 * x); } + struct GainTriplet { float Base, HF, LF; }; void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, const float zpos, @@ -685,7 +687,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con const al::span<const GainTriplet,MAX_SENDS> WetGain, EffectSlot *(&SendSlots)[MAX_SENDS], const VoiceProps *props, const ContextParams &Context, const DeviceBase *Device) { - static const ChanMap MonoMap[1]{ + static constexpr ChanMap MonoMap[1]{ { FrontCenter, 0.0f, 0.0f } }, RearMap[2]{ { BackLeft, Deg2Rad(-150.0f), Deg2Rad(0.0f) }, |