aboutsummaryrefslogtreecommitdiffstats
path: root/core/voice.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-05 01:47:55 -0800
committerChris Robinson <[email protected]>2023-01-05 01:47:55 -0800
commit23c8a35505fe6ab7a5c87754911a133b23ac75cf (patch)
treed36b9dabb413680d8074f3e8aad0084691d20813 /core/voice.cpp
parent58a18ab3c0126337d17939b5060fce28a39b8cf1 (diff)
Add and use mixers that process one input and output channel
Diffstat (limited to 'core/voice.cpp')
-rw-r--r--core/voice.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/voice.cpp b/core/voice.cpp
index 1b979614..5fa9f677 100644
--- a/core/voice.cpp
+++ b/core/voice.cpp
@@ -84,6 +84,19 @@ inline MixerOutFunc SelectMixer()
return Mix_<CTag>;
}
+inline MixerOneFunc SelectMixerOne()
+{
+#ifdef HAVE_NEON
+ if((CPUCapFlags&CPU_CAP_NEON))
+ return Mix_<NEONTag>;
+#endif
+#ifdef HAVE_SSE
+ if((CPUCapFlags&CPU_CAP_SSE))
+ return Mix_<SSETag>;
+#endif
+ return Mix_<CTag>;
+}
+
inline HrtfMixerFunc SelectHrtfMixer()
{
#ifdef HAVE_NEON
@@ -153,6 +166,7 @@ void Voice::InitMixer(al::optional<std::string> resampler)
}
MixSamplesOut = SelectMixer();
+ MixSamplesOne = SelectMixerOne();
MixHrtfBlendSamples = SelectHrtfBlendMixer();
MixHrtfSamples = SelectHrtfMixer();
}