aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-23 02:45:50 -0700
committerChris Robinson <[email protected]>2014-03-23 02:45:50 -0700
commitb0d511a8609cd2f3c10fd5b65603211a14c8141e (patch)
treeed50d56b16a3450f36ee21332b5b6df052693a56 /Alc/ALu.c
parentcc599333a8100dd3b8e52ef018e01d4e184c1532 (diff)
Store the HrtfState directly in the DirectParams
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index b0e9ea24..384042c3 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -465,10 +465,9 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
src->Direct.Mix.Hrtf.Params.Delay[c]);
}
}
- ALSource->Hrtf.Counter = 0;
+ src->Direct.Mix.Hrtf.State.Counter = 0;
src->Direct.Mix.Hrtf.Params.IrSize = GetHrtfIrSize(Device->Hrtf);
- src->Direct.Mix.Hrtf.State = &ALSource->Hrtf;
src->DryMix = SelectHrtfMixer();
}
else
@@ -873,7 +872,7 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
/* Check to see if the HRIR is already moving. */
- if(ALSource->Hrtf.Moving)
+ if(src->Direct.Mix.Hrtf.State.Moving)
{
/* Calculate the normalized HRTF transition factor (delta). */
delta = CalcHrtfDelta(src->Direct.Mix.Hrtf.Params.Gain, DryGain,
@@ -882,13 +881,14 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
* coefficients, target delays, steppping values, and counter. */
if(delta > 0.001f)
{
- ALSource->Hrtf.Counter = GetMovingHrtfCoeffs(Device->Hrtf,
+ ALuint counter = GetMovingHrtfCoeffs(Device->Hrtf,
ev, az, DryGain, delta,
- ALSource->Hrtf.Counter,
+ src->Direct.Mix.Hrtf.State.Counter,
src->Direct.Mix.Hrtf.Params.Coeffs[0],
src->Direct.Mix.Hrtf.Params.Delay[0],
src->Direct.Mix.Hrtf.Params.CoeffStep,
src->Direct.Mix.Hrtf.Params.DelayStep);
+ src->Direct.Mix.Hrtf.State.Counter = counter;
src->Direct.Mix.Hrtf.Params.Gain = DryGain;
src->Direct.Mix.Hrtf.Params.Dir[0] = Position[0];
src->Direct.Mix.Hrtf.Params.Dir[1] = Position[1];
@@ -901,8 +901,8 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
GetLerpedHrtfCoeffs(Device->Hrtf, ev, az, DryGain,
src->Direct.Mix.Hrtf.Params.Coeffs[0],
src->Direct.Mix.Hrtf.Params.Delay[0]);
- ALSource->Hrtf.Counter = 0;
- ALSource->Hrtf.Moving = AL_TRUE;
+ src->Direct.Mix.Hrtf.State.Counter = 0;
+ src->Direct.Mix.Hrtf.State.Moving = AL_TRUE;
src->Direct.Mix.Hrtf.Params.Gain = DryGain;
src->Direct.Mix.Hrtf.Params.Dir[0] = Position[0];
src->Direct.Mix.Hrtf.Params.Dir[1] = Position[1];
@@ -910,7 +910,6 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
src->Direct.Mix.Hrtf.Params.IrSize = GetHrtfIrSize(Device->Hrtf);
- src->Direct.Mix.Hrtf.State = &ALSource->Hrtf;
src->DryMix = SelectHrtfMixer();
}
else