aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer/mixer_c.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-01-23 12:23:05 -0800
committerChris Robinson <[email protected]>2019-01-23 12:23:05 -0800
commit8429770c3f4f6ab4bd21d5af518de58d6af3af57 (patch)
tree02a77ef595b71f571b718755e0a57e60af4ce2d4 /Alc/mixer/mixer_c.cpp
parentd3842a632da8542ac0c8fbdff39dc3d4a25c1a16 (diff)
Use template declarations for the HRTF mixers
Diffstat (limited to 'Alc/mixer/mixer_c.cpp')
-rw-r--r--Alc/mixer/mixer_c.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp
index 6b1cc495..fad08e74 100644
--- a/Alc/mixer/mixer_c.cpp
+++ b/Alc/mixer/mixer_c.cpp
@@ -125,11 +125,33 @@ static inline void ApplyCoeffs(ALsizei Offset, ALfloat (&Values)[HRIR_LENGTH][2]
}
}
-#define MixHrtf MixHrtf_C
-#define MixHrtfBlend MixHrtfBlend_C
-#define MixDirectHrtf MixDirectHrtf_C
#include "hrtf_inc.cpp"
+template<>
+void MixHrtf_<CTag>(ALfloat *RESTRICT LeftOut, ALfloat *RESTRICT RightOut, const ALfloat *data,
+ ALsizei Offset, const ALsizei OutPos, const ALsizei IrSize, MixHrtfParams *hrtfparams,
+ HrtfState *hrtfstate, const ALsizei BufferSize)
+{
+ MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, data, Offset, OutPos, IrSize, hrtfparams,
+ hrtfstate, BufferSize);
+}
+
+template<>
+void MixHrtfBlend_<CTag>(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)
+{
+ MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, data, Offset, OutPos, IrSize, oldparams,
+ newparams, hrtfstate, BufferSize);
+}
+
+template<>
+void MixDirectHrtf_<CTag>(ALfloat *RESTRICT LeftOut, ALfloat *RESTRICT RightOut,
+ const ALfloat (*data)[BUFFERSIZE], DirectHrtfState *State, const ALsizei NumChans,
+ const ALsizei BufferSize)
+{ MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, data, State, NumChans, BufferSize); }
+
template<>
void Mix_<CTag>(const ALfloat *data, const ALsizei OutChans, ALfloat (*OutBuffer)[BUFFERSIZE],