From 5c8855b9a1849af855923aa1b87005febd01704b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 14 Feb 2023 08:38:25 -0800 Subject: Support MSADPCM samples in the mixer --- al/buffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'al') 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(blocks) * DstBlockSize}; @@ -1490,7 +1491,8 @@ START_API_FUNC break; case AL_BITS: - *value = (albuf->mType == FmtIMA4) ? 4 : static_cast(albuf->bytesFromFmt() * 8); + *value = (albuf->mType == FmtIMA4 || albuf->mType == FmtMSADPCM) ? 4 + : static_cast(albuf->bytesFromFmt() * 8); break; case AL_CHANNELS: -- cgit v1.2.3