Make HRTF stepping values per-channel

This commit is contained in:
Chris Robinson 2014-04-05 10:24:13 -07:00
parent 569374da2c
commit 5e0fc84f49
3 changed files with 6 additions and 6 deletions

View File

@ -959,8 +959,8 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
src->Direct.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.Params.CoeffStep[0],
src->Direct.Mix.Hrtf.Params.DelayStep[0]);
src->Direct.Counter = counter;
src->Direct.Mix.Hrtf.Params.Gain = DryGain;
src->Direct.Mix.Hrtf.Params.Dir[0] = Position[0];

View File

@ -28,8 +28,8 @@ void MixDirect_Hrtf(DirectParams *params, const ALfloat *restrict data, ALuint s
{
ALfloat (*restrict DryBuffer)[BUFFERSIZE] = params->OutBuffer;
const ALuint IrSize = params->Mix.Hrtf.Params.IrSize;
const ALint *restrict DelayStep = params->Mix.Hrtf.Params.DelayStep;
const ALfloat (*restrict CoeffStep)[2] = params->Mix.Hrtf.Params.CoeffStep;
const ALint *restrict DelayStep = params->Mix.Hrtf.Params.DelayStep[srcchan];
const ALfloat (*restrict CoeffStep)[2] = params->Mix.Hrtf.Params.CoeffStep[srcchan];
const ALfloat (*restrict TargetCoeffs)[2] = params->Mix.Hrtf.Params.Coeffs[srcchan];
const ALuint *restrict TargetDelay = params->Mix.Hrtf.Params.Delay[srcchan];
ALfloat *restrict History = params->Mix.Hrtf.State.History[srcchan];

View File

@ -46,9 +46,9 @@ typedef struct HrtfParams {
ALfloat Gain;
ALfloat Dir[3];
ALIGN(16) ALfloat Coeffs[MAX_INPUT_CHANNELS][HRIR_LENGTH][2];
ALIGN(16) ALfloat CoeffStep[HRIR_LENGTH][2];
ALIGN(16) ALfloat CoeffStep[MAX_INPUT_CHANNELS][HRIR_LENGTH][2];
ALuint Delay[MAX_INPUT_CHANNELS][2];
ALint DelayStep[2];
ALint DelayStep[MAX_INPUT_CHANNELS][2];
ALuint IrSize;
} HrtfParams;