diff options
author | Chris Robinson <[email protected]> | 2012-04-26 07:50:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-04-26 07:50:17 -0700 |
commit | 2cdb58fb850f085b801c3d33b82512efd083020c (patch) | |
tree | 6a66e6012fcdbb430a2e7511d2f44e9c5e9c72d2 /Alc | |
parent | 68ab23236417ff54057380c1a3c08ec8f4c98838 (diff) |
The mixer always uses floats
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/mixer.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 433a707f..b28b4911 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -100,13 +100,12 @@ static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2], #endif -#define DECL_TEMPLATE(T, sampler) \ -static void Mix_Hrtf_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ - const ALvoid *srcdata, ALuint srcfrac, ALuint OutPos, ALuint SamplesToDo, \ - ALuint BufferSize) \ +#define DECL_TEMPLATE(sampler) \ +static void Mix_Hrtf_##sampler(ALsource *Source, ALCdevice *Device, \ + const ALfloat *RESTRICT data, ALuint srcfrac, ALuint OutPos, \ + ALuint SamplesToDo, ALuint BufferSize) \ { \ const ALuint NumChannels = Source->NumChannels; \ - const T *RESTRICT data = srcdata; \ const ALint *RESTRICT DelayStep = Source->Params.HrtfDelayStep; \ ALfloat (*RESTRICT DryBuffer)[MAXCHANNELS]; \ ALfloat *RESTRICT ClickRemoval, *RESTRICT PendingClicks; \ @@ -296,20 +295,19 @@ static void Mix_Hrtf_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ } \ } -DECL_TEMPLATE(ALfloat, point32) -DECL_TEMPLATE(ALfloat, lerp32) -DECL_TEMPLATE(ALfloat, cubic32) +DECL_TEMPLATE(point32) +DECL_TEMPLATE(lerp32) +DECL_TEMPLATE(cubic32) #undef DECL_TEMPLATE -#define DECL_TEMPLATE(T, sampler) \ -static void Mix_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ - const ALvoid *srcdata, ALuint srcfrac, ALuint OutPos, ALuint SamplesToDo, \ - ALuint BufferSize) \ +#define DECL_TEMPLATE(sampler) \ +static void Mix_##sampler(ALsource *Source, ALCdevice *Device, \ + const ALfloat *RESTRICT data, ALuint srcfrac, ALuint OutPos, \ + ALuint SamplesToDo, ALuint BufferSize) \ { \ const ALuint NumChannels = Source->NumChannels; \ - const T *RESTRICT data = srcdata; \ ALfloat (*RESTRICT DryBuffer)[MAXCHANNELS]; \ ALfloat *RESTRICT ClickRemoval, *RESTRICT PendingClicks; \ ALfloat DrySend[MAXCHANNELS]; \ @@ -424,9 +422,9 @@ static void Mix_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ } \ } -DECL_TEMPLATE(ALfloat, point32) -DECL_TEMPLATE(ALfloat, lerp32) -DECL_TEMPLATE(ALfloat, cubic32) +DECL_TEMPLATE(point32) +DECL_TEMPLATE(lerp32) +DECL_TEMPLATE(cubic32) #undef DECL_TEMPLATE @@ -436,11 +434,11 @@ MixerFunc SelectMixer(enum Resampler Resampler) switch(Resampler) { case PointResampler: - return Mix_ALfloat_point32; + return Mix_point32; case LinearResampler: - return Mix_ALfloat_lerp32; + return Mix_lerp32; case CubicResampler: - return Mix_ALfloat_cubic32; + return Mix_cubic32; case ResamplerMax: break; } @@ -452,11 +450,11 @@ MixerFunc SelectHrtfMixer(enum Resampler Resampler) switch(Resampler) { case PointResampler: - return Mix_Hrtf_ALfloat_point32; + return Mix_Hrtf_point32; case LinearResampler: - return Mix_Hrtf_ALfloat_lerp32; + return Mix_Hrtf_lerp32; case CubicResampler: - return Mix_Hrtf_ALfloat_cubic32; + return Mix_Hrtf_cubic32; case ResamplerMax: break; } |