From 471f905fbd5f665148d2e9f40aca7ee6b1bead7b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 31 Jul 2019 10:09:43 -0700 Subject: Use enums for the resampler and mixer template tags --- alc/mixer/defs.h | 56 +++++++++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/alc/mixer/defs.h b/alc/mixer/defs.h index 3e5d1125..0cd4162a 100644 --- a/alc/mixer/defs.h +++ b/alc/mixer/defs.h @@ -1,46 +1,44 @@ #ifndef MIXER_DEFS_H #define MIXER_DEFS_H -#include "AL/alc.h" #include "AL/al.h" #include "alcmain.h" -#include "alu.h" #include "alspan.h" - - -struct MixGains; -struct MixHrtfFilter; -struct HrtfState; -struct DirectHrtfState; - - -struct CTag { }; -struct SSETag { }; -struct SSE2Tag { }; -struct SSE3Tag { }; -struct SSE4Tag { }; -struct NEONTag { }; - -struct CopyTag { }; -struct PointTag { }; -struct LerpTag { }; -struct CubicTag { }; -struct BSincTag { }; - -template +#include "alu.h" +#include "hrtf.h" + + +enum InstSetType { + CTag, + SSETag, + SSE2Tag, + SSE3Tag, + SSE4Tag, + NEONTag +}; + +enum ResampleType { + CopyTag, + PointTag, + LerpTag, + CubicTag, + BSincTag +}; + +template const ALfloat *Resample_(const InterpState *state, const ALfloat *RESTRICT src, ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen); -template +template void Mix_(const ALfloat *data, const al::span OutBuffer, ALfloat *CurrentGains, const ALfloat *TargetGains, const ALsizei Counter, const ALsizei OutPos, const ALsizei BufferSize); -template +template void MixRow_(FloatBufferLine &OutBuffer, const ALfloat *Gains, const al::span InSamples, const ALsizei InPos, const ALsizei BufferSize); -template +template void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const ALsizei BufferSize); -template +template void MixHrtfBlend_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize); -template +template void MixDirectHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const al::span InSamples, float2 *AccumSamples, DirectHrtfState *State, const ALsizei BufferSize); /* Vectorized resampler helpers */ -- cgit v1.2.3