diff options
author | Chris Robinson <[email protected]> | 2012-02-20 20:08:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-20 20:08:45 -0800 |
commit | 58316a97d551841d92934a2204ce95b9fab0dba1 (patch) | |
tree | 91816cb81a501aeb0489cdc4f59cba2fc4df5daf | |
parent | 771ef3e8d528ada386456c9206421f55a628a8cb (diff) |
Override the resampler as needed right after calculating the step value
-rw-r--r-- | Alc/ALu.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -163,6 +163,8 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) if(ALSource->Params.Step == 0) ALSource->Params.Step = 1; } + if(ALSource->Params.Step == FRACTIONONE) + Resampler = PointResampler; Channels = ALBuffer->FmtChannels; break; @@ -170,11 +172,9 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) BufferListItem = BufferListItem->next; } if(!DirectChannels && Device->Hrtf) - ALSource->Params.DoMix = SelectHrtfMixer((ALSource->Params.Step==FRACTIONONE) ? - PointResampler : Resampler); + ALSource->Params.DoMix = SelectHrtfMixer(Resampler); else - ALSource->Params.DoMix = SelectMixer((ALSource->Params.Step==FRACTIONONE) ? - PointResampler : Resampler); + ALSource->Params.DoMix = SelectMixer(Resampler); /* Calculate gains */ DryGain = clampf(SourceVolume, MinVolume, MaxVolume); @@ -667,17 +667,17 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) if(ALSource->Params.Step == 0) ALSource->Params.Step = 1; } + if(ALSource->Params.Step == FRACTIONONE) + Resampler = PointResampler; break; } BufferListItem = BufferListItem->next; } if(Device->Hrtf) - ALSource->Params.DoMix = SelectHrtfMixer((ALSource->Params.Step==FRACTIONONE) ? - PointResampler : Resampler); + ALSource->Params.DoMix = SelectHrtfMixer(Resampler); else - ALSource->Params.DoMix = SelectMixer((ALSource->Params.Step==FRACTIONONE) ? - PointResampler : Resampler); + ALSource->Params.DoMix = SelectMixer(Resampler); if(Device->Hrtf) { |