aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index fb4757c4..9b4471a6 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -904,8 +904,7 @@ static void MixSomeSources(ALCcontext *ALContext, float (*DryBuffer)[OUTPUTCHANN
rampLength = max(rampLength, SamplesToDo);
another_source:
- State = ALSource->state;
- if(State != AL_PLAYING)
+ if(ALSource->state != AL_PLAYING)
{
if((ALSource=ALSource->next) != NULL)
goto another_source;
@@ -931,11 +930,6 @@ another_source:
BufferListItem = BufferListItem->next;
}
- /* Get source info */
- BuffersPlayed = ALSource->BuffersPlayed;
- DataPosInt = ALSource->position;
- DataPosFrac = ALSource->position_fraction;
-
if(ALSource->NeedsUpdate)
{
//Only apply 3D calculations for mono buffers
@@ -946,6 +940,12 @@ another_source:
ALSource->NeedsUpdate = AL_FALSE;
}
+ /* Get source info */
+ State = ALSource->state;
+ BuffersPlayed = ALSource->BuffersPlayed;
+ DataPosInt = ALSource->position;
+ DataPosFrac = ALSource->position_fraction;
+
/* Compute 18.14 fixed point step */
Pitch = (ALSource->Params.Pitch*Frequency) / DeviceFreq;
if(Pitch > (float)MAX_PITCH) Pitch = (float)MAX_PITCH;