From 8e04a8a0228aea5df0881f6b44d0fea61036d080 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 May 2014 02:24:31 -0700 Subject: Put per-channel filter properties together --- Alc/mixer.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'Alc/mixer.c') diff --git a/Alc/mixer.c b/Alc/mixer.c index 04efcf44..86a0eef6 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -348,19 +348,21 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo) DirectParams *parms = &src->Direct; const ALfloat *samples; - samples = DoFilters(&parms->LpFilter[chan], &parms->HpFilter[chan], - SrcData, ResampledData, DstBufferSize, - parms->Filters[chan]); + samples = DoFilters( + &parms->Filters[chan].LowPass, &parms->Filters[chan].HighPass, + SrcData, ResampledData, DstBufferSize, parms->Filters[chan].ActiveType + ); if(!src->IsHrtf) src->Dry.Mix(parms->OutBuffer, samples, &parms->Mix.Gains[chan], maxu(parms->Counter, OutPos) - OutPos, OutPos, DstBufferSize); else - src->Dry.HrtfMix(parms->OutBuffer, SrcData, - maxu(parms->Counter, OutPos) - OutPos, - parms->Offset + OutPos, OutPos, - parms->Mix.Hrtf.IrSize, &parms->Mix.Hrtf.Params[chan], - &parms->Mix.Hrtf.State[chan], DstBufferSize); + src->Dry.HrtfMix( + parms->OutBuffer, SrcData, maxu(parms->Counter, OutPos) - OutPos, + parms->Offset + OutPos, OutPos, parms->Mix.Hrtf.IrSize, + &parms->Mix.Hrtf.Params[chan], &parms->Mix.Hrtf.State[chan], + DstBufferSize + ); } for(j = 0;j < Device->NumAuxSends;j++) @@ -371,9 +373,10 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo) if(!parms->OutBuffer) continue; - samples = DoFilters(&parms->LpFilter[chan], &parms->HpFilter[chan], - SrcData, ResampledData, DstBufferSize, - parms->Filters[chan]); + samples = DoFilters( + &parms->Filters[chan].LowPass, &parms->Filters[chan].HighPass, + SrcData, ResampledData, DstBufferSize, parms->Filters[chan].ActiveType + ); src->WetMix(parms->OutBuffer, samples, &parms->Gain, maxu(parms->Counter, OutPos) - OutPos, OutPos, DstBufferSize); -- cgit v1.2.3