From 50e33ce8f49fdf40a9c48871d63e2cb49d72c94f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 4 Dec 2020 13:53:56 -0800 Subject: Change some macros into constexpr variables --- alc/alu.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'alc/alu.h') diff --git a/alc/alu.h b/alc/alu.h index 7e7f8996..fd1d0b37 100644 --- a/alc/alu.h +++ b/alc/alu.h @@ -72,7 +72,7 @@ void aluInitEffectPanning(ALeffectslot *slot, ALCcontext *context); * The components are ordered such that OpenAL's X, Y, and Z are the first, * second, and third parameters respectively -- simply negate X and Z. */ -std::array CalcAmbiCoeffs(const float y, const float z, const float x, +std::array CalcAmbiCoeffs(const float y, const float z, const float x, const float spread); /** @@ -82,7 +82,7 @@ std::array CalcAmbiCoeffs(const float y, const float z, * vector must be normalized (unit length), and the spread is the angular width * of the sound (0...tau). */ -inline std::array CalcDirectionCoeffs(const float (&dir)[3], +inline std::array CalcDirectionCoeffs(const float (&dir)[3], const float spread) { /* Convert from OpenAL coords to Ambisonics. */ @@ -96,7 +96,7 @@ inline std::array CalcDirectionCoeffs(const float (&dir * azimuth and elevation parameters are in radians, going right and up * respectively. */ -inline std::array CalcAngleCoeffs(const float azimuth, +inline std::array CalcAngleCoeffs(const float azimuth, const float elevation, const float spread) { const float x{-std::sin(azimuth) * std::cos(elevation)}; @@ -125,7 +125,7 @@ auto SetAmbiPanIdentity(T iter, I count, F func) -> std::enable_if_t coeffs{{1.0f}}; + std::array coeffs{{1.0f}}; func(*iter, coeffs); ++iter; for(I i{1};i < count;++i,++iter) -- cgit v1.2.3