diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -279,14 +279,9 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - ALsizei maxstep = BUFFERSIZE; - maxstep -= ResamplerPadding[Resampler] + - ResamplerPrePadding[Resampler] + 1; - maxstep = mini(maxstep, INT_MAX>>FRACTIONBITS); - Pitch = Pitch * ALBuffer->Frequency / Frequency; - if(Pitch > (ALfloat)maxstep) - ALSource->Params.Step = maxstep<<FRACTIONBITS; + if(Pitch > 10.0f) + ALSource->Params.Step = 10<<FRACTIONBITS; else { ALSource->Params.Step = fastf2i(Pitch*FRACTIONONE); @@ -777,14 +772,9 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) { /* Calculate fixed-point stepping value, based on the pitch, buffer * frequency, and output frequency. */ - ALsizei maxstep = BUFFERSIZE; - maxstep -= ResamplerPadding[Resampler] + - ResamplerPrePadding[Resampler] + 1; - maxstep = mini(maxstep, INT_MAX>>FRACTIONBITS); - Pitch = Pitch * ALBuffer->Frequency / Frequency; - if(Pitch > (ALfloat)maxstep) - ALSource->Params.Step = maxstep<<FRACTIONBITS; + if(Pitch > 10.0f) + ALSource->Params.Step = 10<<FRACTIONBITS; else { ALSource->Params.Step = fastf2i(Pitch*FRACTIONONE); |