diff options
author | Chris Robinson <[email protected]> | 2023-02-16 17:27:25 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-16 17:27:25 -0800 |
commit | 3e26402762c05d8daecabccdf76b7578ac9f7de9 (patch) | |
tree | b40903e38b88619345abd2e7a27cedd6dfac2d6c | |
parent | 4e53db83877ba3f38af3516e188c5c7509d6b016 (diff) |
Set the proper block align for callback buffers
-rw-r--r-- | al/buffer.cpp | 2 |
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; |