aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-06-03 03:58:04 -0700
committerChris Robinson <[email protected]>2010-06-03 03:58:04 -0700
commit90db244b5f0c25ef1c24639210bbadd3be6ef81a (patch)
tree3ae7c6c8a924769cde16193969e325b61b8a3102 /Alc/ALu.c
parente98f1205e547422764ef2bdce2c47ac54998f6d6 (diff)
Skip mixing after checking looping validity
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d0f6a112..817e7d6e 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1030,11 +1030,11 @@ next_source:
while(State == AL_PLAYING && j < SamplesToDo)
{
+ ALfloat *Data = NULL;
ALuint LoopStart = 0;
ALuint LoopEnd = 0;
ALuint DataSize = 0;
ALbuffer *ALBuffer;
- ALfloat *Data;
ALuint BufferSize;
/* Get buffer info */
@@ -1046,8 +1046,6 @@ next_source:
LoopStart = ALBuffer->LoopStart;
LoopEnd = ALBuffer->LoopEnd;
}
- if(DataPosInt >= DataSize)
- goto skipmix;
if(Looping && ALSource->lSourceType == AL_STATIC)
{
@@ -1062,6 +1060,9 @@ next_source:
LoopEnd = DataSize;
}
+ if(DataPosInt >= DataSize)
+ goto skipmix;
+
if(BufferListItem->next)
{
ALbuffer *NextBuf = BufferListItem->next->buffer;