aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 67e74396..fd2eba01 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -612,7 +612,9 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
if(!Counter)
{
parms->Hrtf.Old = parms->Hrtf.Target;
- hrtfparams.Current = &parms->Hrtf.Target;
+ hrtfparams.Coeffs = SAFE_CONST(ALfloat2*,parms->Hrtf.Target.Coeffs);
+ hrtfparams.Delay[0] = parms->Hrtf.Target.Delay[0];
+ hrtfparams.Delay[1] = parms->Hrtf.Target.Delay[1];
hrtfparams.Gain = parms->Hrtf.Target.Gain;
hrtfparams.GainStep = 0.0f;
MixHrtfSamples(
@@ -631,7 +633,9 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
* So it needs to fade out over DstBufferSize instead
* of Counter.
*/
- hrtfparams.Current = &parms->Hrtf.Old;
+ hrtfparams.Coeffs = SAFE_CONST(ALfloat2*,parms->Hrtf.Old.Coeffs);
+ hrtfparams.Delay[0] = parms->Hrtf.Old.Delay[0];
+ hrtfparams.Delay[1] = parms->Hrtf.Old.Delay[1];
hrtfparams.Gain = parms->Hrtf.Old.Gain;
hrtfparams.GainStep = -hrtfparams.Gain /
(ALfloat)DstBufferSize;
@@ -648,8 +652,10 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
* fade time this mix handles.
*/
gain = lerp(parms->Hrtf.Old.Gain, parms->Hrtf.Target.Gain,
- minf(1.0f, (ALfloat)Counter / (ALfloat)DstBufferSize));
- hrtfparams.Current = &parms->Hrtf.Target;
+ minf(1.0f, (ALfloat)Counter/DstBufferSize));
+ hrtfparams.Coeffs = SAFE_CONST(ALfloat2*,parms->Hrtf.Target.Coeffs);
+ hrtfparams.Delay[0] = parms->Hrtf.Target.Delay[0];
+ hrtfparams.Delay[1] = parms->Hrtf.Target.Delay[1];
hrtfparams.Gain = 0.0f;
hrtfparams.GainStep = gain / (ALfloat)DstBufferSize;
MixHrtfSamples(