From 7e81918f7b76135928f7e40eff77493ea98596d5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 11 Sep 2012 01:59:42 -0700 Subject: Update HRTF code This update allows for much more flexibility in the HRTF data. It also allows for HRTF table file names to include "%r" to represent the device's playback rate (e.g. if you set hrtf-%r.mhr, then it will try to use hrtf-44100.mhr or hrtf-48000.mhr depending if the device's output rate is 44100 or 48000, respectively). The makehrtf utility has also been updated to support more options and input file formats, as well as the new mhr format. --- Alc/mixer_neon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Alc/mixer_neon.c') diff --git a/Alc/mixer_neon.c b/Alc/mixer_neon.c index f7a9fed5..0dedb885 100644 --- a/Alc/mixer_neon.c +++ b/Alc/mixer_neon.c @@ -11,12 +11,13 @@ static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2], + const ALuint IrSize, ALfloat (*RESTRICT Coeffs)[2], ALfloat (*RESTRICT CoeffStep)[2], ALfloat left, ALfloat right) { ALuint c; - for(c = 0;c < HRIR_LENGTH;c++) + for(c = 0;c < IrSize;c++) { const ALuint off = (Offset+c)&HRIR_MASK; Values[off][0] += Coeffs[c][0] * left; @@ -27,6 +28,7 @@ static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2 } static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2], + const ALuint IrSize, ALfloat (*RESTRICT Coeffs)[2], ALfloat left, ALfloat right) { @@ -38,7 +40,7 @@ static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2], leftright2 = vset_lane_f32(right, leftright2, 1); leftright4 = vcombine_f32(leftright2, leftright2); } - for(c = 0;c < HRIR_LENGTH;c += 2) + for(c = 0;c < IrSize;c += 2) { const ALuint o0 = (Offset+c)&HRIR_MASK; const ALuint o1 = (o0+1)&HRIR_MASK; -- cgit v1.2.3