Fix IMA4 decoding
This commit is contained in:
parent
a79129835c
commit
3f8ae8f1ce
@ -885,7 +885,8 @@ static void DecodeIMA4Block(ALshort *dst, const ALubyte *IMAData, ALint numchans
|
|||||||
{
|
{
|
||||||
for(c = 0;c < numchans;c++)
|
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];
|
Index[c] += g_IMAIndex_adjust_4[IMACode[c]&15];
|
||||||
|
|
||||||
if(Sample[c] < -32768) Sample[c] = -32768;
|
if(Sample[c] < -32768) Sample[c] = -32768;
|
||||||
@ -894,7 +895,7 @@ static void DecodeIMA4Block(ALshort *dst, const ALubyte *IMAData, ALint numchans
|
|||||||
if(Index[c] < 0) Index[c] = 0;
|
if(Index[c] < 0) Index[c] = 0;
|
||||||
else if(Index[c] > 88) Index[c] = 88;
|
else if(Index[c] > 88) Index[c] = 88;
|
||||||
|
|
||||||
dst[(j+k)*numchans + c] = Sample[c];
|
dst[j*numchans + c] = Sample[c];
|
||||||
IMACode[c] >>= 4;
|
IMACode[c] >>= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user