diff options
author | Chris Robinson <[email protected]> | 2023-03-22 16:09:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-03-22 23:21:01 -0700 |
commit | ac01cbf7a518df913b3c9e45565a4ab7a8653bc7 (patch) | |
tree | 7845df00e378f55bdd175cffff48cf7ef9c2dcc6 /al/source.cpp | |
parent | d4bfb62591be4682238f72825c293f0416956934 (diff) |
Log the buffer format when queueing mismatched buffers
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp index da22713b..f49d0a20 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3867,17 +3867,21 @@ START_API_FUNC { fmt_mismatch |= BufferFmt->mSampleRate != buffer->mSampleRate; fmt_mismatch |= BufferFmt->mChannels != buffer->mChannels; + fmt_mismatch |= BufferFmt->mType != buffer->mType; if(BufferFmt->isBFormat()) { fmt_mismatch |= BufferFmt->mAmbiLayout != buffer->mAmbiLayout; fmt_mismatch |= BufferFmt->mAmbiScaling != buffer->mAmbiScaling; } fmt_mismatch |= BufferFmt->mAmbiOrder != buffer->mAmbiOrder; - fmt_mismatch |= BufferFmt->mType != buffer->mType; } if(fmt_mismatch) UNLIKELY { - context->setError(AL_INVALID_OPERATION, "Queueing buffer with mismatched format"); + context->setError(AL_INVALID_OPERATION, "Queueing buffer with mismatched format\n" + " Expected: %uhz, %s, %s ; Got: %uhz, %s, %s\n", BufferFmt->mSampleRate, + NameFromFormat(BufferFmt->mType), NameFromFormat(BufferFmt->mChannels), + buffer->mSampleRate, NameFromFormat(buffer->mType), + NameFromFormat(buffer->mChannels)); buffer_error: /* A buffer failed (invalid ID or format), so unlock and release |