diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2022-01-02 00:18:29 -0800 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2022-01-02 00:18:29 -0800 |
commit | fff09a2e5c4c5c0e359003e4c58436b3269b2858 (patch) | |
tree | 5d9313c71bd028ab7f808c3a54ec2db060e8361f | |
parent | 72c99b52d8b0af0895a549dad752f57b49fceda1 (diff) |
Don't mix higher orders of B-Format than the device is doing
-rw-r--r-- | core/voice.cpp | 4 |
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, |