aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-03 18:59:26 -0700
committerChris Robinson <[email protected]>2014-05-03 18:59:26 -0700
commitd066c7b124a7efa771996bc7ba09e0e074683739 (patch)
tree3f5b863bf4cb66eff4f09ae7123196968323419e /Alc/ALu.c
parentb2e533fbfc3c61bbf3936750e85039f9f664f007 (diff)
Better pack HRTF mixing properties
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 4bff7525..25d2db42 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -473,12 +473,12 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
if(chans[c].channel == LFE)
{
/* Skip LFE */
- src->Direct.Mix.Hrtf.Params.Delay[c][0] = 0;
- src->Direct.Mix.Hrtf.Params.Delay[c][1] = 0;
+ src->Direct.Mix.Hrtf.Params[c].Delay[0] = 0;
+ src->Direct.Mix.Hrtf.Params[c].Delay[1] = 0;
for(i = 0;i < HRIR_LENGTH;i++)
{
- src->Direct.Mix.Hrtf.Params.Coeffs[c][i][0] = 0.0f;
- src->Direct.Mix.Hrtf.Params.Coeffs[c][i][1] = 0.0f;
+ src->Direct.Mix.Hrtf.Params[c].Coeffs[i][0] = 0.0f;
+ src->Direct.Mix.Hrtf.Params[c].Coeffs[i][1] = 0.0f;
}
}
else
@@ -487,13 +487,13 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
* channel. */
GetLerpedHrtfCoeffs(Device->Hrtf,
0.0f, chans[c].angle, DryGain,
- src->Direct.Mix.Hrtf.Params.Coeffs[c],
- src->Direct.Mix.Hrtf.Params.Delay[c]);
+ src->Direct.Mix.Hrtf.Params[c].Coeffs,
+ src->Direct.Mix.Hrtf.Params[c].Delay);
}
}
src->Direct.Counter = 0;
src->Direct.Moving = AL_TRUE;
- src->Direct.Mix.Hrtf.Params.IrSize = GetHrtfIrSize(Device->Hrtf);
+ src->Direct.Mix.Hrtf.IrSize = GetHrtfIrSize(Device->Hrtf);
src->DryMix = SelectHrtfMixer();
}
@@ -948,8 +948,8 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
if(src->Direct.Moving)
{
/* Calculate the normalized HRTF transition factor (delta). */
- delta = CalcHrtfDelta(src->Direct.Mix.Hrtf.Params.Gain, DryGain,
- src->Direct.Mix.Hrtf.Params.Dir, Position);
+ delta = CalcHrtfDelta(src->Direct.Mix.Hrtf.Gain, DryGain,
+ src->Direct.Mix.Hrtf.Dir, Position);
/* If the delta is large enough, get the moving HRIR target
* coefficients, target delays, steppping values, and counter. */
if(delta > 0.001f)
@@ -957,31 +957,31 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
ALuint counter = GetMovingHrtfCoeffs(Device->Hrtf,
ev, az, DryGain, delta,
src->Direct.Counter,
- src->Direct.Mix.Hrtf.Params.Coeffs[0],
- src->Direct.Mix.Hrtf.Params.Delay[0],
- src->Direct.Mix.Hrtf.Params.CoeffStep[0],
- src->Direct.Mix.Hrtf.Params.DelayStep[0]);
+ src->Direct.Mix.Hrtf.Params[0].Coeffs,
+ src->Direct.Mix.Hrtf.Params[0].Delay,
+ src->Direct.Mix.Hrtf.Params[0].CoeffStep,
+ src->Direct.Mix.Hrtf.Params[0].DelayStep);
src->Direct.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];
- src->Direct.Mix.Hrtf.Params.Dir[2] = Position[2];
+ src->Direct.Mix.Hrtf.Gain = DryGain;
+ src->Direct.Mix.Hrtf.Dir[0] = Position[0];
+ src->Direct.Mix.Hrtf.Dir[1] = Position[1];
+ src->Direct.Mix.Hrtf.Dir[2] = Position[2];
}
}
else
{
/* Get the initial (static) HRIR coefficients and delays. */
GetLerpedHrtfCoeffs(Device->Hrtf, ev, az, DryGain,
- src->Direct.Mix.Hrtf.Params.Coeffs[0],
- src->Direct.Mix.Hrtf.Params.Delay[0]);
+ src->Direct.Mix.Hrtf.Params[0].Coeffs,
+ src->Direct.Mix.Hrtf.Params[0].Delay);
src->Direct.Counter = 0;
src->Direct.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];
- src->Direct.Mix.Hrtf.Params.Dir[2] = Position[2];
+ src->Direct.Mix.Hrtf.Gain = DryGain;
+ src->Direct.Mix.Hrtf.Dir[0] = Position[0];
+ src->Direct.Mix.Hrtf.Dir[1] = Position[1];
+ src->Direct.Mix.Hrtf.Dir[2] = Position[2];
}
- src->Direct.Mix.Hrtf.Params.IrSize = GetHrtfIrSize(Device->Hrtf);
+ src->Direct.Mix.Hrtf.IrSize = GetHrtfIrSize(Device->Hrtf);
src->DryMix = SelectHrtfMixer();
}