diff options
author | Chris Robinson <[email protected]> | 2021-03-31 09:37:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-03-31 09:37:30 -0700 |
commit | 35a0f2665f834c107e39ec2dcfc3d9ae0a0b33ce (patch) | |
tree | 5e889ba0dfb6664b9035c856b333f79c5aeecb88 /al/source.cpp | |
parent | 8793055e666d2019dd48422c2e4ece1d3118e2f7 (diff) |
Decode UHJ buffers to B-Format for mixing
This should also have an adjustment for the shelf filter. Although it's not
clear what the appropriate adjustments should be.
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 8 |
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; |