diff options
author | Chris Robinson <[email protected]> | 2018-12-26 15:35:05 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-26 15:35:05 -0800 |
commit | 4f253a935a14e49a77516a56e0d4c6d6177a56b6 (patch) | |
tree | 088b3171e77f6c7863c9bbe851b4f82f4a58fbe3 /Alc/mixer/mixer_neon.cpp | |
parent | c5be03b51e8fd9bda3a46c345bdc945cfd965c2e (diff) |
Handle HRTF coefficients and values by reference where possible
Diffstat (limited to 'Alc/mixer/mixer_neon.cpp')
-rw-r--r-- | Alc/mixer/mixer_neon.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Alc/mixer/mixer_neon.cpp b/Alc/mixer/mixer_neon.cpp index fa777eac..4843922f 100644 --- a/Alc/mixer/mixer_neon.cpp +++ b/Alc/mixer/mixer_neon.cpp @@ -133,12 +133,13 @@ const ALfloat *Resample_bsinc_Neon(const InterpState *state, } -static inline void ApplyCoeffs(ALsizei Offset, ALfloat (*RESTRICT Values)[2], - const ALsizei IrSize, - const ALfloat (*RESTRICT Coeffs)[2], - ALfloat left, ALfloat right) +static inline void ApplyCoeffs(ALsizei Offset, ALfloat (&Values)[HRIR_LENGTH][2], + const ALsizei IrSize, const ALfloat (&Coeffs)[HRIR_LENGTH][2], + const ALfloat left, const ALfloat right) { - ALsizei c; + ASSUME(IrSize >= 2); + ASSUME(&Values != &Coeffs); + float32x4_t leftright4; { float32x2_t leftright2 = vdup_n_f32(0.0); @@ -147,7 +148,7 @@ static inline void ApplyCoeffs(ALsizei Offset, ALfloat (*RESTRICT Values)[2], leftright4 = vcombine_f32(leftright2, leftright2); } - for(c = 0;c < IrSize;c += 2) + for(ALsizei c{0};c < IrSize;c += 2) { const ALsizei o0 = (Offset+c)&HRIR_MASK; const ALsizei o1 = (o0+1)&HRIR_MASK; |