From d6dc855511982a76be8289966842030d135a8578 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 7 Aug 2010 02:32:16 -0700 Subject: Set up increment once --- Alc/mixer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Alc') diff --git a/Alc/mixer.c b/Alc/mixer.c index 1d4c388e..6b0406be 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -156,6 +156,17 @@ static void MixSource(ALsource *ALSource, ALCcontext *ALContext, wetGainStep[i] = (ALSource->Params.WetGains[i]-WetSend[i]) / rampLength; + /* Compute 18.14 fixed point step */ + if(ALSource->Params.Pitch > (float)MAX_PITCH) + increment = MAX_PITCH << FRACTIONBITS; + else if(!(ALSource->Params.Pitch > 0.f)) + increment = (1<Params.Pitch*(1L<Params.iirFilter; for(i = 0;i < MAX_SENDS;i++) { @@ -231,17 +242,6 @@ static void MixSource(ALsource *ALSource, ALCcontext *ALContext, else memset(&Data[DataSize*Channels], 0, (BUFFER_PADDING*Channels*Bytes)); - /* Compute 18.14 fixed point step */ - if(ALSource->Params.Pitch > (float)MAX_PITCH) - increment = MAX_PITCH << FRACTIONBITS; - else if(!(ALSource->Params.Pitch > 0.f)) - increment = (1<Params.Pitch*(1L<