aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_inc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-24 22:26:42 -0800
committerChris Robinson <[email protected]>2014-11-24 22:26:42 -0800
commit8e6c131b364e674429c20a03a54a7aac487ec704 (patch)
treeb339b9c4f375fb930b97f0153b4293465daaa839 /Alc/mixer_inc.c
parentcbe22763eec9391bce03ebc2294ec742be1f381b (diff)
Use a separate method to set initial HRTF coefficients
Diffstat (limited to 'Alc/mixer_inc.c')
-rw-r--r--Alc/mixer_inc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index b4635b43..63003f03 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -14,6 +14,9 @@
#define MixHrtf MERGE(MixHrtf_,SUFFIX)
+static inline void SetupCoeffs(ALfloat (*restrict OutCoeffs)[2],
+ const HrtfParams *hrtfparams,
+ ALuint IrSize, ALuint Counter);
static inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*restrict Values)[2],
const ALuint irSize,
ALfloat (*restrict Coeffs)[2],
@@ -33,13 +36,8 @@ void MixHrtf(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
ALuint Delay[2];
ALfloat left, right;
ALuint pos;
- ALuint c;
- for(c = 0;c < IrSize;c++)
- {
- Coeffs[c][0] = hrtfparams->Coeffs[c][0] - (hrtfparams->CoeffStep[c][0]*Counter);
- Coeffs[c][1] = hrtfparams->Coeffs[c][1] - (hrtfparams->CoeffStep[c][1]*Counter);
- }
+ SetupCoeffs(Coeffs, hrtfparams, IrSize, Counter);
Delay[0] = hrtfparams->Delay[0] - (hrtfparams->DelayStep[0]*Counter);
Delay[1] = hrtfparams->Delay[1] - (hrtfparams->DelayStep[1]*Counter);