aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2022-01-02 00:18:29 -0800
committerChris Robinson <chris.kcat@gmail.com>2022-01-02 00:18:29 -0800
commitfff09a2e5c4c5c0e359003e4c58436b3269b2858 (patch)
tree5d9313c71bd028ab7f808c3a54ec2db060e8361f
parent72c99b52d8b0af0895a549dad752f57b49fceda1 (diff)
Don't mix higher orders of B-Format than the device is doing
-rw-r--r--core/voice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/voice.cpp b/core/voice.cpp
index b303793f..16117d4a 100644
--- a/core/voice.cpp
+++ b/core/voice.cpp
@@ -828,10 +828,10 @@ void Voice::mix(const State vstate, ContextBase *Context, const uint SamplesToDo
void Voice::prepare(DeviceBase *device)
{
/* Even if storing really high order ambisonics, we only mix channels for
- * orders up to MaxAmbiOrder. The rest are simply dropped.
+ * orders up to the device order. The rest are simply dropped.
*/
uint num_channels{(mFmtChannels == FmtUHJ2 || mFmtChannels == FmtSuperStereo) ? 3 :
- ChannelsFromFmt(mFmtChannels, minu(mAmbiOrder, MaxAmbiOrder))};
+ ChannelsFromFmt(mFmtChannels, minu(mAmbiOrder, device->mAmbiOrder))};
if(unlikely(num_channels > device->mSampleData.size()))
{
ERR("Unexpected channel count: %u (limit: %zu, %d:%d)\n", num_channels,