Skip mixing after checking looping validity

This commit is contained in:
Chris Robinson 2010-06-03 03:58:04 -07:00
parent e98f1205e5
commit 90db244b5f

View File

@ -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;