From 82c5b741e5c7448eb2649e33505622e42e08794e Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Mon, 15 Aug 2022 12:56:36 -0700
Subject: Use proper array sizes for more gains

---
 core/mixer.cpp | 2 +-
 core/mixer.h   | 2 +-
 core/voice.h   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'core')

diff --git a/core/mixer.cpp b/core/mixer.cpp
index 4618406b..3c98ed5e 100644
--- a/core/mixer.cpp
+++ b/core/mixer.cpp
@@ -114,7 +114,7 @@ std::array<float,MaxAmbiChannels> CalcAmbiCoeffs(const float y, const float z, c
 }
 
 void ComputePanGains(const MixParams *mix, const float*RESTRICT coeffs, const float ingain,
-    const al::span<float,MAX_OUTPUT_CHANNELS> gains)
+    const al::span<float,MaxAmbiChannels> gains)
 {
     auto ambimap = mix->AmbiMap.cbegin();
 
diff --git a/core/mixer.h b/core/mixer.h
index 309f4224..b819b3c7 100644
--- a/core/mixer.h
+++ b/core/mixer.h
@@ -78,7 +78,7 @@ inline std::array<float,MaxAmbiChannels> CalcAngleCoeffs(const float azimuth,
  * scale and orient the sound samples.
  */
 void ComputePanGains(const MixParams *mix, const float*RESTRICT coeffs, const float ingain,
-    const al::span<float,MAX_OUTPUT_CHANNELS> gains);
+    const al::span<float,MaxAmbiChannels> gains);
 
 
 /** Helper to set an identity/pass-through panning for ambisonic mixing (3D input). */
diff --git a/core/voice.h b/core/voice.h
index 42ad7704..9dd642b4 100644
--- a/core/voice.h
+++ b/core/voice.h
@@ -85,8 +85,8 @@ struct SendParams {
     BiquadFilter HighPass;
 
     struct {
-        std::array<float,MAX_OUTPUT_CHANNELS> Current;
-        std::array<float,MAX_OUTPUT_CHANNELS> Target;
+        std::array<float,MaxAmbiChannels> Current;
+        std::array<float,MaxAmbiChannels> Target;
     } Gains;
 };
 
-- 
cgit v1.2.3