aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-12 00:38:04 -0700
committerChris Robinson <[email protected]>2010-05-12 00:38:04 -0700
commitd678f1d88bbb2eceef98cb414b580b22b7881b68 (patch)
tree49e808f419fafae85fd77c70d26c74c47cb16b56 /Alc/ALu.c
parentf0ce1bff3eddbe9d081585abe1aaa2810371b692 (diff)
Store looping locally when mixing a source
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 1f96d5f7..d2678687 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -934,6 +934,7 @@ static void MixSomeSources(ALCcontext *ALContext, float (*DryBuffer)[OUTPUTCHANN
ALuint Frequency;
resampler_t Resampler;
ALuint BuffersPlayed;
+ ALboolean Looping;
ALfloat Pitch;
ALenum State;
ALsizei pos;
@@ -990,6 +991,7 @@ next_source:
BuffersPlayed = ALSource->BuffersPlayed;
DataPosInt = ALSource->position;
DataPosFrac = ALSource->position_fraction;
+ Looping = ALSource->bLooping;
/* Compute 18.14 fixed point step */
Pitch = (ALSource->Params.Pitch*Frequency) / DeviceFreq;
@@ -1053,7 +1055,7 @@ next_source:
memcpy(&Data[DataSize*Channels], NextBuf->data, ulExtraSamples);
}
}
- else if(ALSource->bLooping)
+ else if(Looping)
{
ALbuffer *NextBuf = ALSource->queue->buffer;
if(NextBuf && NextBuf->size)
@@ -1359,7 +1361,7 @@ next_source:
BuffersPlayed++;
DataPosInt -= DataSize;
}
- else if(ALSource->bLooping)
+ else if(Looping)
{
BufferListItem = ALSource->queue;
BuffersPlayed = 0;