aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 72af95f0..81e17c52 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -838,8 +838,7 @@ AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum eParam, const ALint* pl
alSetError(pContext, AL_INVALID_VALUE);
else
{
- ALint maxlen = ALBuf->size / aluBytesFromFormat(ALBuf->format) /
- aluChannelsFromFormat(ALBuf->format);
+ ALint maxlen = ALBuf->size / aluFrameSizeFromFormat(ALBuf->format);
if(plValues[0] > maxlen || plValues[1] > maxlen)
alSetError(pContext, AL_INVALID_VALUE);
else