diff options
Diffstat (limited to 'Alc/mixer_sse.c')
-rw-r--r-- | Alc/mixer_sse.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c index d86cf749..75f50f88 100644 --- a/Alc/mixer_sse.c +++ b/Alc/mixer_sse.c @@ -19,6 +19,23 @@ #include "mixer_defs.h" +static inline void SetupCoeffs(ALfloat (*restrict OutCoeffs)[2], + const HrtfParams *hrtfparams, + ALuint IrSize, ALuint Counter) +{ + const __m128 counter4 = _mm_set1_ps((float)Counter); + __m128 coeffs, step4; + ALuint i; + + for(i = 0;i < IrSize;i += 2) + { + step4 = _mm_load_ps(&hrtfparams->CoeffStep[i][0]); + coeffs = _mm_load_ps(&hrtfparams->Coeffs[i][0]); + coeffs = _mm_sub_ps(coeffs, _mm_mul_ps(step4, counter4)); + _mm_store_ps(&OutCoeffs[i][0], coeffs); + } +} + static inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*restrict Values)[2], const ALuint IrSize, ALfloat (*restrict Coeffs)[2], |