aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-09-24 23:32:50 -0700
committerChris Robinson <[email protected]>2010-09-24 23:32:50 -0700
commitbc6d94cd25901ef8e92df0b656fb3b5c697d949c (patch)
tree226b5a79be4ca869e95e7014d5f37ba3ee3e9655
parente70141e57b62fb67b41f1a6d8f3497feb79172b2 (diff)
Avoid sampling beyond the end of the loop
-rw-r--r--Alc/mixer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 2d2eb73b..3514daa4 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -145,7 +145,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \
@@ -214,7 +214,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \
@@ -280,7 +280,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \
@@ -354,7 +354,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \
@@ -420,7 +420,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \
@@ -492,7 +492,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
{ \
ALuint p = pos; \
ALuint f = frac; \
- if(p >= DataSize) \
+ if(p >= LoopEnd) \
{ \
ALuint64 pos64 = pos; \
pos64 <<= FRACTIONBITS; \