diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alBuffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index bb2d36de..5b29bf03 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -885,16 +885,17 @@ static void DecodeIMA4Block(ALshort *dst, const ALubyte *IMAData, ALint numchans { for(c = 0;c < numchans;c++) { - Sample[c] += ((g_IMAStep_size[Index[c]]*g_IMACodeword_4[IMACode[c]&15])/8); + Sample[c] += g_IMAStep_size[Index[c]] * + g_IMACodeword_4[IMACode[c]&15] / 8; Index[c] += g_IMAIndex_adjust_4[IMACode[c]&15]; if(Sample[c] < -32768) Sample[c] = -32768; else if(Sample[c] > 32767) Sample[c] = 32767; - if(Index[c]<0) Index[c] = 0; - else if(Index[c]>88) Index[c] = 88; + if(Index[c] < 0) Index[c] = 0; + else if(Index[c] > 88) Index[c] = 88; - dst[(j+k)*numchans + c] = Sample[c]; + dst[j*numchans + c] = Sample[c]; IMACode[c] >>= 4; } } |