Avoid a couple explicit format checks for buffers

This commit is contained in:
Chris Robinson 2007-12-28 19:21:21 -08:00
parent d7bf7a8b0d
commit 8343a98ec6

View File

@ -817,11 +817,11 @@ ALAPI ALvoid ALAPIENTRY alGetBufferi(ALuint buffer, ALenum eParam, ALint *plValu
break; break;
case AL_BITS: case AL_BITS:
*plValue= (((pBuffer->format==AL_FORMAT_MONO8)||(pBuffer->format==AL_FORMAT_STEREO8))?8:16); *plValue = aluBytesFromFormat(pBuffer->format) * 8;
break; break;
case AL_CHANNELS: case AL_CHANNELS:
*plValue = (((pBuffer->format==AL_FORMAT_MONO8)||(pBuffer->format==AL_FORMAT_MONO16))?1:2); *plValue = aluChannelsFromFormat(pBuffer->format);
break; break;
case AL_SIZE: case AL_SIZE: