diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 2 | ||||
-rw-r--r-- | Alc/mixer.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -455,6 +455,7 @@ static void CalcNonAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *p else voice->Step = maxi(fastf2i(Pitch*FRACTIONONE + 0.5f), 1); BsincPrepare(voice->Step, &voice->ResampleState.bsinc); + voice->Resampler = SelectResampler(props->Resampler); /* Calculate gains */ DryGain = clampf(SourceVolume, MinVolume, MaxVolume); @@ -1095,6 +1096,7 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop else voice->Step = maxi(fastf2i(Pitch*FRACTIONONE + 0.5f), 1); BsincPrepare(voice->Step, &voice->ResampleState.bsinc); + voice->Resampler = SelectResampler(props->Resampler); voice->Flags &= ~(VOICE_IS_HRTF | VOICE_HAS_NFC); if(Device->Render_Mode == HrtfRender) diff --git a/Alc/mixer.c b/Alc/mixer.c index b1d014a7..2070f859 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -53,7 +53,6 @@ enum Resampler ResamplerDefault = LinearResampler; static MixerFunc MixSamples = Mix_C; static HrtfMixerFunc MixHrtfSamples = MixHrtf_C; -static ResamplerFunc ResampleSamples = Resample_point32_C; MixerFunc SelectMixer(void) { @@ -177,7 +176,6 @@ void aluInitMixer(void) MixHrtfSamples = SelectHrtfMixer(); MixSamples = SelectMixer(); - ResampleSamples = SelectResampler(ResamplerDefault); } @@ -295,7 +293,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei IrSize = (Device->HrtfHandle ? Device->HrtfHandle->irSize : 0); Resample = ((increment == FRACTIONONE && DataPosFrac == 0) ? - Resample_copy32_C : ResampleSamples); + Resample_copy32_C : voice->Resampler); Counter = (voice->Flags&VOICE_IS_MOVING) ? SamplesToDo : 0; OutPos = 0; |