From cc91490b6104b5304655c6e4367371ea929d20bb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 29 Mar 2019 11:28:38 -0700 Subject: Use a temporary buffer for HRTF filter accumulation Similar to the history buffer, to avoid using the state buffer as a ring buffer. --- OpenAL32/Include/alu.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenAL32/Include/alu.h') diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 6cdd7d9f..fb0d7d37 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -298,15 +298,14 @@ using RowMixerFunc = void(*)(ALfloat *OutBuffer, const ALfloat *gains, const ALfloat (*data)[BUFFERSIZE], const ALsizei InChans, const ALsizei InPos, const ALsizei BufferSize); using HrtfMixerFunc = void(*)(ALfloat *RESTRICT LeftOut, ALfloat *RESTRICT RightOut, - const ALfloat *data, ALsizei Offset, const ALsizei OutPos, const ALsizei IrSize, - MixHrtfParams *hrtfparams, HrtfState *hrtfstate, const ALsizei BufferSize); + const ALfloat *data, float2 *RESTRICT AccumSamples, const ALsizei OutPos, const ALsizei IrSize, + MixHrtfParams *hrtfparams, const ALsizei BufferSize); using HrtfMixerBlendFunc = void(*)(ALfloat *RESTRICT LeftOut, ALfloat *RESTRICT RightOut, - const ALfloat *data, ALsizei Offset, const ALsizei OutPos, const ALsizei IrSize, - const HrtfParams *oldparams, MixHrtfParams *newparams, HrtfState *hrtfstate, - const ALsizei BufferSize); + const ALfloat *data, float2 *RESTRICT AccumSamples, const ALsizei OutPos, const ALsizei IrSize, + const HrtfParams *oldparams, MixHrtfParams *newparams, const ALsizei BufferSize); using HrtfDirectMixerFunc = void(*)(ALfloat *RESTRICT LeftOut, ALfloat *RESTRICT RightOut, - const ALfloat (*data)[BUFFERSIZE], DirectHrtfState *State, const ALsizei NumChans, - const ALsizei BufferSize); + const ALfloat (*data)[BUFFERSIZE], float2 *RESTRICT AccumSamples, DirectHrtfState *State, + const ALsizei NumChans, const ALsizei BufferSize); #define GAIN_MIX_MAX (1000.0f) /* +60dB */ -- cgit v1.2.3