aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-22 16:09:47 -0700
committerChris Robinson <[email protected]>2023-03-22 23:21:01 -0700
commitac01cbf7a518df913b3c9e45565a4ab7a8653bc7 (patch)
tree7845df00e378f55bdd175cffff48cf7ef9c2dcc6 /al/source.cpp
parentd4bfb62591be4682238f72825c293f0416956934 (diff)
Log the buffer format when queueing mismatched buffers
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp8
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