aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-07-13 06:31:13 -0700
committerChris Robinson <[email protected]>2021-07-13 06:31:13 -0700
commitd998c03a2761920b1edc4f1da09a04072af83d7e (patch)
treeede3bda406061fe8b47072b3d459b0ead2e879e8 /al
parentfb2cb2bd064c681defda5f1019faa5189ec3bb34 (diff)
Add a UHJ-specific coefficient scaling array
Diffstat (limited to 'al')
-rw-r--r--al/buffer.cpp1
-rw-r--r--al/source.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 26fe863e..e9c1f76b 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -317,6 +317,7 @@ ALenum EnumFromAmbiScaling(AmbiScaling scale)
case AmbiScaling::FuMa: return AL_FUMA_SOFT;
case AmbiScaling::SN3D: return AL_SN3D_SOFT;
case AmbiScaling::N3D: return AL_SN3D_SOFT;
+ case AmbiScaling::UHJ: break;
}
throw std::runtime_error{"Invalid AmbiScaling: "+std::to_string(int(scale))};
}
diff --git a/al/source.cpp b/al/source.cpp
index b8278fed..ef70a86d 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -499,7 +499,7 @@ void InitVoice(Voice *voice, ALsource *source, ALbufferQueueItem *BufferList, AL
voice->mAmbiLayout = (buffer->mChannels == FmtUHJ2 || buffer->mChannels == FmtUHJ3
|| voice->mFmtChannels == FmtUHJ4) ? AmbiLayout::FuMa : buffer->mAmbiLayout;
voice->mAmbiScaling = (buffer->mChannels == FmtUHJ2 || buffer->mChannels == FmtUHJ3
- || voice->mFmtChannels == FmtUHJ4) ? AmbiScaling::FuMa : buffer->mAmbiScaling;
+ || voice->mFmtChannels == FmtUHJ4) ? AmbiScaling::UHJ : buffer->mAmbiScaling;
voice->mAmbiOrder = buffer->mAmbiOrder;
if(buffer->mCallback) voice->mFlags |= VoiceIsCallback;