aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-16 17:27:25 -0800
committerChris Robinson <[email protected]>2023-02-16 17:27:25 -0800
commit3e26402762c05d8daecabccdf76b7578ac9f7de9 (patch)
treeb40903e38b88619345abd2e7a27cedd6dfac2d6c
parent4e53db83877ba3f38af3516e188c5c7509d6b016 (diff)
Set the proper block align for callback buffers
-rw-r--r--al/buffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 8534fa54..2313a067 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -515,9 +515,9 @@ void PrepareCallback(ALCcontext *context, ALbuffer *ALBuf, ALsizei freq,
ALBuf->OriginalType = SrcType;
ALBuf->OriginalSize = 0;
- ALBuf->mBlockAlign = 1;
ALBuf->Access = 0;
+ ALBuf->mBlockAlign = (SrcType == UserFmtIMA4 || SrcType == UserFmtMSADPCM) ? align : 1;
ALBuf->mSampleRate = static_cast<ALuint>(freq);
ALBuf->mChannels = *DstChannels;
ALBuf->mType = *DstType;