aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/al/source.cpp b/al/source.cpp
index b2bb0d75..dd9e6cc7 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -439,13 +439,13 @@ void InitVoice(Voice *voice, ALsource *source, ALbufferQueueItem *BufferList, AL
std::memory_order_relaxed);
ALbuffer *buffer{BufferList->mBuffer};
- ALuint num_channels{buffer->channelsFromFmt()};
+ ALuint num_channels{(buffer->mChannels==FmtUHJ2) ? 3 : buffer->channelsFromFmt()};
voice->mFrequency = buffer->mSampleRate;
voice->mFmtChannels = buffer->mChannels;
voice->mFmtType = buffer->mType;
- voice->mSampleSize = buffer->bytesFromFmt();
- voice->mAmbiLayout = buffer->mAmbiLayout;
- voice->mAmbiScaling = buffer->mAmbiScaling;
+ voice->mFrameSize = buffer->frameSizeFromFmt();
+ voice->mAmbiLayout = (buffer->mChannels==FmtUHJ2) ? AmbiLayout::FuMa : buffer->mAmbiLayout;
+ voice->mAmbiScaling = (buffer->mChannels==FmtUHJ2) ? AmbiScaling::FuMa : buffer->mAmbiScaling;
voice->mAmbiOrder = buffer->mAmbiOrder;
if(buffer->mCallback) voice->mFlags |= VoiceIsCallback;