diff options
author | Chris Robinson <[email protected]> | 2010-05-24 21:51:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-05-24 21:51:30 -0700 |
commit | 37190b2cafdec52a23034194a3e63d8d33bdc544 (patch) | |
tree | 99dada718dcb76d94223b62392f0181b5a3314ba /OpenAL32/alBuffer.c | |
parent | c6b948323ebc8632e0b763f090cdcd19255d0ac2 (diff) |
Add a function to get the frame size from a format
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 3 |
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 |