aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 5bb386a8..9a6192f6 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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;
}
}
}