From ad10d4ee74601f81552c3bf91701d6718fde2c60 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 24 May 2010 17:40:16 -0700 Subject: Increment pointer when read --- OpenAL32/alBuffer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenAL32/alBuffer.c') diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 6ad18c05..754a5b35 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -1266,19 +1266,17 @@ static void ConvertDataIMA4(ALfloat *dst, const ALvoid *src, ALint chans, ALsize { for(c = 0;c < chans;c++) { - Sample[c] = IMAData[0]; - Sample[c] |= IMAData[1] << 8; + Sample[c] = *(IMAData++); + Sample[c] |= *(IMAData++) << 8; Sample[c] = (Sample[c]^0x8000) - 32768; - Index[c] = IMAData[2]; - Index[c] |= IMAData[3] << 8; + Index[c] = *(IMAData++); + Index[c] |= *(IMAData++) << 8; Index[c] = (Index[c]^0x8000) - 32768; Index[c] = ((Index[c]<0) ? 0 : Index[c]); Index[c] = ((Index[c]>88) ? 88 : Index[c]); dst[i*65*chans + c] = ((Sample[c] < 0) ? (Sample[c]/32768.0f) : (Sample[c]/32767.0f)); - - IMAData += 4; } for(j = 1;j < 65;j += 8) -- cgit v1.2.3