diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 39 |
1 files changed, 18 insertions, 21 deletions
@@ -1041,11 +1041,11 @@ another_source: /* Compute the gain steps for each output channel */ for(i = 0;i < OUTPUTCHANNELS;i++) - dryGainStep[i] = (ALSource->Params.DryGains[i]- - DrySend[i]) / rampLength; + dryGainStep[i] = (ALSource->Params.DryGains[i]-DrySend[i]) / + rampLength; for(i = 0;i < MAX_SENDS;i++) - wetGainStep[i] = (ALSource->Params.WetGains[i]- - WetSend[i]) / rampLength; + wetGainStep[i] = (ALSource->Params.WetGains[i]-WetSend[i]) / + rampLength; /* Figure out how many samples we can mix. */ DataSize64 = DataSize; @@ -1206,25 +1206,22 @@ another_source: BuffersPlayed++; DataPosInt -= DataSize; } - else + else if(ALSource->bLooping) { - if(!ALSource->bLooping) - { - State = AL_STOPPED; - BufferListItem = ALSource->queue; - BuffersPlayed = ALSource->BuffersInQueue; - DataPosInt = 0; - DataPosFrac = 0; - } + BufferListItem = ALSource->queue; + BuffersPlayed = 0; + if(ALSource->BuffersInQueue == 1) + DataPosInt %= DataSize; else - { - BufferListItem = ALSource->queue; - BuffersPlayed = 0; - if(ALSource->BuffersInQueue == 1) - DataPosInt %= DataSize; - else - DataPosInt -= DataSize; - } + DataPosInt -= DataSize; + } + else + { + State = AL_STOPPED; + BufferListItem = ALSource->queue; + BuffersPlayed = ALSource->BuffersInQueue; + DataPosInt = 0; + DataPosFrac = 0; } } } |