aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-07-31 23:42:30 -0700
committerChris Robinson <[email protected]>2016-07-31 23:42:30 -0700
commit0fcd39c4c0205b8229df16f48b05cf0bf6600287 (patch)
treee94485a070eb032097ee010f15984d83dafa2d2f /Alc
parent48ff5d4ce8bd5f2d65c1aa8af77c2923d3be801c (diff)
Don't store the looping state in the voice
Certain operations on the buffer queue depend on the loop state to behave properly, so it should not be deferred until the async voice update occurs.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c2
-rw-r--r--Alc/mixer.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d1a12672..70fe7f49 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -437,7 +437,6 @@ static void CalcNonAttnSourceParams(ALvoice *voice, const struct ALsourceProps *
voice->SendOut[i].Channels = SendSlots[i]->NumChannels;
}
}
- voice->Looping = ATOMIC_LOAD(&props->Looping, almemory_order_relaxed);
/* Calculate the stepping value */
Pitch *= (ALfloat)ALBuffer->Frequency / Frequency;
@@ -906,7 +905,6 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALsourceProps *pro
voice->SendOut[i].Channels = SendSlots[i]->NumChannels;
}
}
- voice->Looping = ATOMIC_LOAD(&props->Looping, almemory_order_relaxed);
/* Transform source to listener space (convert to head relative) */
if(ATOMIC_LOAD(&props->HeadRelative, almemory_order_relaxed) == AL_FALSE)
diff --git a/Alc/mixer.c b/Alc/mixer.c
index b2af812a..9f6ec9d1 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -388,9 +388,9 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
BufferListItem = ATOMIC_LOAD(&Source->current_buffer);
DataPosInt = ATOMIC_LOAD(&Source->position, almemory_order_relaxed);
DataPosFrac = ATOMIC_LOAD(&Source->position_fraction, almemory_order_relaxed);
+ Looping = ATOMIC_LOAD(&Source->looping, almemory_order_relaxed);
NumChannels = Source->NumChannels;
SampleSize = Source->SampleSize;
- Looping = voice->Looping;
increment = voice->Step;
IrSize = (Device->Hrtf ? Device->Hrtf->irSize : 0);