Read the channel format from the correct object

This commit is contained in:
Chris Robinson 2021-07-13 10:03:00 -07:00
parent 105abc6513
commit 0977627ca6

View File

@ -497,9 +497,9 @@ void InitVoice(Voice *voice, ALsource *source, ALbufferQueueItem *BufferList, AL
voice->mNumChannels = buffer->channelsFromFmt();
voice->mFrameSize = buffer->frameSizeFromFmt();
voice->mAmbiLayout = (buffer->mChannels == FmtUHJ2 || buffer->mChannels == FmtUHJ3
|| voice->mFmtChannels == FmtUHJ4) ? AmbiLayout::FuMa : buffer->mAmbiLayout;
|| buffer->mChannels == FmtUHJ4) ? AmbiLayout::FuMa : buffer->mAmbiLayout;
voice->mAmbiScaling = (buffer->mChannels == FmtUHJ2 || buffer->mChannels == FmtUHJ3
|| voice->mFmtChannels == FmtUHJ4) ? AmbiScaling::UHJ : buffer->mAmbiScaling;
|| buffer->mChannels == FmtUHJ4) ? AmbiScaling::UHJ : buffer->mAmbiScaling;
voice->mAmbiOrder = buffer->mAmbiOrder;
if(buffer->mCallback) voice->mFlags |= VoiceIsCallback;