diff options
author | Chris Robinson <[email protected]> | 2014-03-05 06:18:55 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-03-05 06:18:55 -0800 |
commit | 61569e09ed196a45e06d87229b8ce87747455816 (patch) | |
tree | ce3681442a4b9715cea55b51560f6f4119666861 /OpenAL32/alBuffer.c | |
parent | a4126b66d4c44d60c8f10c4b8949de1c7b247994 (diff) |
Allocate enough temp space for the ADPCM decoders and encoders
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 3c547f7f..eeeb9315 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -1830,7 +1830,7 @@ static void Convert_##T##_ALima4(T *dst, const ALima4 *src, ALuint numchans, \ ALuint i, j, k; \ ALshort *tmp; \ \ - tmp = alloca(align*numchans); \ + tmp = alloca(align*numchans*sizeof(*tmp)); \ for(i = 0;i < len;i += align) \ { \ DecodeIMA4Block(tmp, src, numchans, align); \ @@ -1881,7 +1881,7 @@ static void Convert_ALima4_##T(ALima4 *dst, const T *src, ALuint numchans, \ ALuint i, j, k; \ ALshort *tmp; \ \ - tmp = alloca(align*numchans); \ + tmp = alloca(align*numchans*sizeof(*tmp)); \ for(i = 0;i < len;i += align) \ { \ for(j = 0;j < align;j++) \ @@ -1933,7 +1933,7 @@ static void Convert_##T##_ALmsadpcm(T *dst, const ALmsadpcm *src, \ ALuint i, j, k; \ ALshort *tmp; \ \ - tmp = alloca(align*numchans); \ + tmp = alloca(align*numchans*sizeof(*tmp)); \ for(i = 0;i < len;i += align) \ { \ DecodeMSADPCMBlock(tmp, src, numchans, align); \ @@ -1987,7 +1987,7 @@ static void Convert_ALmsadpcm_##T(ALmsadpcm *dst, const T *src, \ \ ERR("MSADPCM encoding not currently supported!\n"); \ \ - tmp = alloca(align*numchans); \ + tmp = alloca(align*numchans*sizeof(*tmp)); \ for(i = 0;i < len;i += align) \ { \ for(j = 0;j < align;j++) \ |