diff options
author | Chris Robinson <[email protected]> | 2014-11-24 22:26:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-24 22:26:42 -0800 |
commit | 8e6c131b364e674429c20a03a54a7aac487ec704 (patch) | |
tree | b339b9c4f375fb930b97f0153b4293465daaa839 /Alc/mixer_c.c | |
parent | cbe22763eec9391bce03ebc2294ec742be1f381b (diff) |
Use a separate method to set initial HRTF coefficients
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r-- | Alc/mixer_c.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index 0fdcc087..fa87c3d4 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -59,6 +59,18 @@ void ALfilterState_processC(ALfilterState *filter, ALfloat *restrict dst, const } +static inline void SetupCoeffs(ALfloat (*restrict OutCoeffs)[2], + const HrtfParams *hrtfparams, + ALuint IrSize, ALuint Counter) +{ + ALuint c; + for(c = 0;c < IrSize;c++) + { + OutCoeffs[c][0] = hrtfparams->Coeffs[c][0] - (hrtfparams->CoeffStep[c][0]*Counter); + OutCoeffs[c][1] = hrtfparams->Coeffs[c][1] - (hrtfparams->CoeffStep[c][1]*Counter); + } +} + static inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*restrict Values)[2], const ALuint IrSize, ALfloat (*restrict Coeffs)[2], |