From b5e36007f136f817e6d14685377e781e224daf17 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 31 Mar 2021 10:03:31 -0700 Subject: Handle 3-channel UHJ audio buffers --- al/source.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'al/source.cpp') diff --git a/al/source.cpp b/al/source.cpp index dd9e6cc7..6d56549a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -444,8 +444,10 @@ void InitVoice(Voice *voice, ALsource *source, ALbufferQueueItem *BufferList, AL voice->mFmtChannels = buffer->mChannels; voice->mFmtType = buffer->mType; voice->mFrameSize = buffer->frameSizeFromFmt(); - voice->mAmbiLayout = (buffer->mChannels==FmtUHJ2) ? AmbiLayout::FuMa : buffer->mAmbiLayout; - voice->mAmbiScaling = (buffer->mChannels==FmtUHJ2) ? AmbiScaling::FuMa : buffer->mAmbiScaling; + voice->mAmbiLayout = (buffer->mChannels==FmtUHJ2 || buffer->mChannels==FmtUHJ3) ? + AmbiLayout::FuMa : buffer->mAmbiLayout; + voice->mAmbiScaling = (buffer->mChannels==FmtUHJ2 || buffer->mChannels==FmtUHJ3) ? + AmbiScaling::FuMa : buffer->mAmbiScaling; voice->mAmbiOrder = buffer->mAmbiOrder; if(buffer->mCallback) voice->mFlags |= VoiceIsCallback; -- cgit v1.2.3