Fix step calculations

This commit is contained in:
Chris Robinson 2010-11-26 20:17:05 -08:00
parent ca1ec4b221
commit 4d4d699780

View File

@ -128,8 +128,6 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALSource->Params.Step = Pitch*FRACTIONONE; ALSource->Params.Step = Pitch*FRACTIONONE;
if(ALSource->Params.Step == 0) if(ALSource->Params.Step == 0)
ALSource->Params.Step = 1; ALSource->Params.Step = 1;
else if(ALSource->Params.Step > maxstep)
ALSource->Params.Step = maxstep;
} }
Channels = aluChannelsFromFormat(ALBuffer->format); Channels = aluChannelsFromFormat(ALBuffer->format);
@ -608,8 +606,6 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALSource->Params.Step = Pitch*FRACTIONONE; ALSource->Params.Step = Pitch*FRACTIONONE;
if(ALSource->Params.Step == 0) if(ALSource->Params.Step == 0)
ALSource->Params.Step = 1; ALSource->Params.Step = 1;
else if(ALSource->Params.Step > maxstep)
ALSource->Params.Step = maxstep;
} }
break; break;
} }