summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-12-01 18:36:07 -0800
committerChris Robinson <[email protected]>2010-12-01 18:36:07 -0800
commit646409cbdfcc059d671c77595390515e01a4222b (patch)
tree633597ff607ef5ab612c4d3f8a1712ec6bfb013e /OpenAL32/alBuffer.c
parent9e8fb89a525c11685869d963c39e4f1076835d85 (diff)
Don't limit IMA4 decoding to 2 channels
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index cbfc843c..5d24ab8b 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -857,8 +857,8 @@ static ALmulaw EncodeMuLaw(ALshort val)
static void DecodeIMA4Block(ALshort *dst, const ALubyte *src, ALint numchans)
{
- ALint sample[2], index[2];
- ALuint code[2];
+ ALint sample[MAXCHANNELS], index[MAXCHANNELS];
+ ALuint code[MAXCHANNELS];
ALsizei j,k,c;
for(c = 0;c < numchans;c++)
@@ -1229,8 +1229,8 @@ DECL_TEMPLATE(ALmulaw, ALmulaw)
static void Convert_##T##_IMA4(T *dst, const ALubyte *src, ALuint numchans, \
ALuint numblocks) \
{ \
- ALshort tmp[65*2]; /* Max samples an IMA4 frame can be */ \
ALuint i, j; \
+ ALshort tmp[65*MAXCHANNELS]; /* Max samples an IMA4 frame can be */ \
for(i = 0;i < numblocks;i++) \
{ \
DecodeIMA4Block(tmp, src, numchans); \