aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-14 08:38:25 -0800
committerChris Robinson <[email protected]>2023-02-14 08:39:30 -0800
commit5c8855b9a1849af855923aa1b87005febd01704b (patch)
tree0100feb60ef3cd3bca241d330ff219af2b76ec4e /al
parenta84efdc45936bcc4427af272b975c6a197081c22 (diff)
Support MSADPCM samples in the mixer
Diffstat (limited to 'al')
-rw-r--r--al/buffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 88028246..4110444e 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -602,6 +602,7 @@ void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALsizei freq, ALuint size,
const ALuint NumChannels{ChannelsFromFmt(*DstChannels, ambiorder)};
const ALuint DstBlockSize{NumChannels *
((*DstType == FmtIMA4) ? (align-1)/2 + 4 :
+ (*DstType == FmtMSADPCM) ? (align-2)/2 + 7 :
(align * BytesFromFmt(*DstType)))};
const size_t newsize{static_cast<size_t>(blocks) * DstBlockSize};
@@ -1490,7 +1491,8 @@ START_API_FUNC
break;
case AL_BITS:
- *value = (albuf->mType == FmtIMA4) ? 4 : static_cast<ALint>(albuf->bytesFromFmt() * 8);
+ *value = (albuf->mType == FmtIMA4 || albuf->mType == FmtMSADPCM) ? 4
+ : static_cast<ALint>(albuf->bytesFromFmt() * 8);
break;
case AL_CHANNELS: