diff options
author | Chris Robinson <[email protected]> | 2019-12-02 12:50:18 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-12-02 12:50:18 -0800 |
commit | 38037e29ba2ac9e452f2704e3722f745f0664a8c (patch) | |
tree | 4bbbc107e192774564a5e9d8e0c10b704b8f1b4e /al/source.cpp | |
parent | 799c60f3bbf041c5eafeb6b3acb7fc5d3f395718 (diff) |
Handle the buffer's ambisonic properties
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/al/source.cpp b/al/source.cpp index 04fd3b66..11049eab 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -2788,9 +2788,11 @@ START_API_FUNC ALbuffer *buffer{BufferList->mBuffer}; voice->mFrequency = buffer->Frequency; voice->mFmtChannels = buffer->mFmtChannels; - voice->mAmbiOrder = 1; voice->mNumChannels = ChannelsFromFmt(buffer->mFmtChannels); voice->mSampleSize = BytesFromFmt(buffer->mFmtType); + voice->mAmbiLayout = static_cast<AmbiLayout>(buffer->AmbiLayout); + voice->mAmbiScaling = static_cast<AmbiNorm>(buffer->AmbiScaling); + voice->mAmbiOrder = 1; /* Clear the stepping value so the mixer knows not to mix this until * the update gets applied. @@ -3136,6 +3138,10 @@ START_API_FUNC BufferFmt = buffer; else if(BufferFmt->Frequency != buffer->Frequency || BufferFmt->mFmtChannels != buffer->mFmtChannels || + ((BufferFmt->mFmtChannels == FmtBFormat2D || + BufferFmt->mFmtChannels == FmtBFormat3D) && + (BufferFmt->AmbiLayout != buffer->AmbiLayout || + BufferFmt->AmbiScaling != buffer->AmbiScaling)) || BufferFmt->OriginalType != buffer->OriginalType) { context->setError(AL_INVALID_OPERATION, "Queueing buffer with mismatched format"); |