diff options
author | Chris Robinson <[email protected]> | 2012-09-09 00:53:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-09 00:53:54 -0700 |
commit | f56dddfa735d5a085bce737fb417ae233049e7d8 (patch) | |
tree | 051f20fc4deda1372820f7fbeabf3bd63e11b904 /Alc/mixer_inc.c | |
parent | 2bf1979d4a805e661bdd43258a5020c96cda1f80 (diff) |
Implement MixDirect_SSE separately from the C and Neon versions
Diffstat (limited to 'Alc/mixer_inc.c')
-rw-r--r-- | Alc/mixer_inc.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c index ff12026b..359662cc 100644 --- a/Alc/mixer_inc.c +++ b/Alc/mixer_inc.c @@ -30,10 +30,9 @@ static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2 static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2], ALfloat (*RESTRICT Coeffs)[2], ALfloat left, ALfloat right); -static __inline void ApplyValue(ALfloat *RESTRICT Output, ALfloat value, - const ALfloat *DrySend); +#ifndef NO_MIXDIRECT_HRTF void MixDirect_Hrtf(ALsource *Source, ALCdevice *Device, DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize) @@ -149,8 +148,9 @@ void MixDirect_Hrtf(ALsource *Source, ALCdevice *Device, DirectParams *params, Coeffs[0][1] * right; } } +#endif - +#ifndef NO_MIXDIRECT void MixDirect(ALsource *Source, ALCdevice *Device, DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize) @@ -176,22 +176,26 @@ void MixDirect(ALsource *Source, ALCdevice *Device, DirectParams *params, if(OutPos == 0) { value = lpFilter2PC(DryFilter, srcchan, data[pos]); - ApplyValue(ClickRemoval, -value, DrySend); + for(c = 0;c < MaxChannels;c++) + ClickRemoval[c] -= value*DrySend[c]; } for(pos = 0;pos < BufferSize;pos++) { value = lpFilter2P(DryFilter, srcchan, data[pos]); - ApplyValue(DryBuffer[OutPos], value, DrySend); + for(c = 0;c < MaxChannels;c++) + DryBuffer[OutPos][c] += value*DrySend[c]; OutPos++; } if(OutPos == SamplesToDo) { value = lpFilter2PC(DryFilter, srcchan, data[pos]); - ApplyValue(PendingClicks, value, DrySend); + for(c = 0;c < MaxChannels;c++) + PendingClicks[c] += value*DrySend[c]; } } +#endif - +#ifndef NO_MIXSEND void MixSend(SendParams *params, const ALfloat *RESTRICT data, ALuint srcchan, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize) { @@ -229,6 +233,8 @@ void MixSend(SendParams *params, const ALfloat *RESTRICT data, ALuint srcchan, WetPendingClicks[0] += value * WetSend; } } +#endif + #undef MixSend #undef MixDirect |