shithub: dumb

Download patch

ref: e032212355ac7075c91fc9d9c48b990f02353a60
parent: 4df0e8c5be294fa1fe3ea96eff8387c2505912ec
author: Chris Moeller <kode54@gmail.com>
date: Fri Jan 11 14:58:42 EST 2013

Made SSE filters configurable

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -738,14 +738,20 @@
     state->currsample = currsample;
     state->prevsample = prevsample;
 }
-
-#define it_filter it_filter_sse
-
-#else
-#define it_filter it_filter_int
 #endif
 
 #undef LOG10
+
+int _dumb_it_use_sse = 0;
+
+static void it_filter(DUMB_CLICK_REMOVER *cr, IT_FILTER_STATE *state, sample_t *dst, long pos, sample_t *src, long size, int step, int sampfreq, int cutoff, int resonance)
+{
+#if defined(_USE_SSE)
+	if ( _dumb_it_use_sse ) it_filter_sse( cr, state, dst, pos, src, size, step, sampfreq, cutoff, resonance );
+	else
+#endif
+	it_filter_int( cr, state, dst, pos, src, size, step, sampfreq, cutoff, resonance );
+}
 
 
 
--- a/dumb/vc6/dumb/dumb.vcxproj
+++ b/dumb/vc6/dumb/dumb.vcxproj
@@ -74,7 +74,7 @@
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
       <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;DUMB_DECLARE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_USE_SSE;NDEBUG;WIN32;_LIB;DUMB_DECLARE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>