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;