aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-20 20:08:45 -0800
committerChris Robinson <[email protected]>2012-02-20 20:08:45 -0800
commit58316a97d551841d92934a2204ce95b9fab0dba1 (patch)
tree91816cb81a501aeb0489cdc4f59cba2fc4df5daf /Alc
parent771ef3e8d528ada386456c9206421f55a628a8cb (diff)
Override the resampler as needed right after calculating the step value
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 4f85d965..743093ed 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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)
{