diff options
author | Chris Robinson <[email protected]> | 2012-09-12 07:57:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-12 07:57:50 -0700 |
commit | ff809f2271099acf4527a23d55a034e1cef5e900 (patch) | |
tree | 0964f798f7f7da352c872995bc89e4adc919f4c2 | |
parent | 41f52fdd6a499a6245e50a131bd7b175fc03dfa2 (diff) |
Move a couple methods to where they're used
-rw-r--r-- | Alc/ALu.c | 45 | ||||
-rw-r--r-- | Alc/mixer.c | 45 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 4 |
3 files changed, 45 insertions, 49 deletions
@@ -36,6 +36,8 @@ #include "alu.h" #include "bs2b.h" +#include "mixer_defs.h" + struct ChanMap { enum Channel channel; @@ -49,6 +51,49 @@ ALfloat ConeScale = 1.0f; ALfloat ZScale = 1.0f; +static DryMixerFunc SelectDirectMixer(void) +{ +#ifdef HAVE_SSE + if((CPUCapFlags&CPU_CAP_SSE)) + return MixDirect_SSE; +#endif +#ifdef HAVE_NEON + if((CPUCapFlags&CPU_CAP_NEON)) + return MixDirect_Neon; +#endif + + return MixDirect_C; +} + +static DryMixerFunc SelectHrtfMixer(void) +{ +#ifdef HAVE_SSE + if((CPUCapFlags&CPU_CAP_SSE)) + return MixDirect_Hrtf_SSE; +#endif +#ifdef HAVE_NEON + if((CPUCapFlags&CPU_CAP_NEON)) + return MixDirect_Hrtf_Neon; +#endif + + return MixDirect_Hrtf_C; +} + +static WetMixerFunc SelectSendMixer(void) +{ +#ifdef HAVE_SSE + if((CPUCapFlags&CPU_CAP_SSE)) + return MixSend_SSE; +#endif +#ifdef HAVE_NEON + if((CPUCapFlags&CPU_CAP_NEON)) + return MixSend_Neon; +#endif + + return MixSend_C; +} + + static __inline ALvoid aluMatrixVector(ALfloat *vector,ALfloat w,ALfloat matrix[4][4]) { ALfloat temp[4] = { diff --git a/Alc/mixer.c b/Alc/mixer.c index 41eba4ae..da3dcc20 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -36,51 +36,6 @@ #include "alu.h" #include "bs2b.h" -#include "mixer_defs.h" - - -DryMixerFunc SelectDirectMixer(void) -{ -#ifdef HAVE_SSE - if((CPUCapFlags&CPU_CAP_SSE)) - return MixDirect_SSE; -#endif -#ifdef HAVE_NEON - if((CPUCapFlags&CPU_CAP_NEON)) - return MixDirect_Neon; -#endif - - return MixDirect_C; -} - -DryMixerFunc SelectHrtfMixer(void) -{ -#ifdef HAVE_SSE - if((CPUCapFlags&CPU_CAP_SSE)) - return MixDirect_Hrtf_SSE; -#endif -#ifdef HAVE_NEON - if((CPUCapFlags&CPU_CAP_NEON)) - return MixDirect_Hrtf_Neon; -#endif - - return MixDirect_Hrtf_C; -} - -WetMixerFunc SelectSendMixer(void) -{ -#ifdef HAVE_SSE - if((CPUCapFlags&CPU_CAP_SSE)) - return MixSend_SSE; -#endif -#ifdef HAVE_NEON - if((CPUCapFlags&CPU_CAP_NEON)) - return MixSend_Neon; -#endif - - return MixSend_C; -} - static __inline ALfloat Sample_ALbyte(ALbyte val) { return val * (1.0f/127.0f); } diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index cc18f1a7..0c7cc28b 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -268,10 +268,6 @@ ALvoid ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat hwidth, ALvoid CalcSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext); ALvoid CalcNonAttnSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext); -DryMixerFunc SelectDirectMixer(void); -DryMixerFunc SelectHrtfMixer(void); -WetMixerFunc SelectSendMixer(void); - ALvoid MixSource(struct ALsource *Source, ALCdevice *Device, ALuint SamplesToDo); ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size); |