aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-28 19:21:21 -0800
committerChris Robinson <[email protected]>2007-12-28 19:21:21 -0800
commit8343a98ec6f044ac94be9cc3d200c6d0e1ce544c (patch)
tree0c43bcbcce758270ef5435388f9a27c5f5587ec9 /OpenAL32
parentd7bf7a8b0d638b167bae04503305ed081eb9d640 (diff)
Avoid a couple explicit format checks for buffers
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alBuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 0abdb61f..a5d7130f 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -817,11 +817,11 @@ ALAPI ALvoid ALAPIENTRY alGetBufferi(ALuint buffer, ALenum eParam, ALint *plValu
break;
case AL_BITS:
- *plValue= (((pBuffer->format==AL_FORMAT_MONO8)||(pBuffer->format==AL_FORMAT_STEREO8))?8:16);
+ *plValue = aluBytesFromFormat(pBuffer->format) * 8;
break;
case AL_CHANNELS:
- *plValue = (((pBuffer->format==AL_FORMAT_MONO8)||(pBuffer->format==AL_FORMAT_MONO16))?1:2);
+ *plValue = aluChannelsFromFormat(pBuffer->format);
break;
case AL_SIZE: