aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-05 06:18:55 -0800
committerChris Robinson <[email protected]>2014-03-05 06:18:55 -0800
commit61569e09ed196a45e06d87229b8ce87747455816 (patch)
treece3681442a4b9715cea55b51560f6f4119666861 /OpenAL32/alBuffer.c
parenta4126b66d4c44d60c8f10c4b8949de1c7b247994 (diff)
Allocate enough temp space for the ADPCM decoders and encoders
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c8
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++) \