aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-24 17:40:16 -0700
committerChris Robinson <[email protected]>2010-05-24 17:40:16 -0700
commitad10d4ee74601f81552c3bf91701d6718fde2c60 (patch)
treed7f4a21ae203b5238b91bf6655708b9822595382
parent3ba3c1ca31279eb6cf344e804c58375b6cfda04d (diff)
Increment pointer when read
-rw-r--r--OpenAL32/alBuffer.c10
1 files changed, 4 insertions, 6 deletions
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)