diff options
Diffstat (limited to 'extra/soundtouch/disable-mmx.patch')
-rw-r--r-- | extra/soundtouch/disable-mmx.patch | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/extra/soundtouch/disable-mmx.patch b/extra/soundtouch/disable-mmx.patch new file mode 100644 index 000000000..11987059c --- /dev/null +++ b/extra/soundtouch/disable-mmx.patch @@ -0,0 +1,115 @@ +diff -ru soundtouch.orig/source/SoundStretch/Makefile.am soundtouch/source/SoundStretch/Makefile.am +--- soundtouch.orig/source/SoundStretch/Makefile.am 2012-02-22 20:51:33.240941439 +0100 ++++ soundtouch/source/SoundStretch/Makefile.am 2012-02-22 20:52:25.936309597 +0100 +@@ -43,11 +43,5 @@ + ## linker.
+ soundstretch_LDADD=../SoundTouch/libSoundTouch.la -lm
+
+-## linker flags
+-soundstretch_LDFLAGS=-s
+-
+-## additional compiler flags
+-soundstretch_CXXFLAGS=-O3
+-
+ #clean-local:
+ # -rm -f additional-files-to-remove-on-make-clean
+diff -ru soundtouch.orig/source/SoundTouch/FIRFilter.cpp soundtouch/source/SoundTouch/FIRFilter.cpp +--- soundtouch.orig/source/SoundTouch/FIRFilter.cpp 2012-02-22 20:51:33.277196949 +0100 ++++ soundtouch/source/SoundTouch/FIRFilter.cpp 2012-02-22 21:00:18.591437748 +0100 +@@ -229,32 +229,6 @@ +
+ FIRFilter * FIRFilter::newInstance()
+ {
+- uint uExtensions;
+-
+- uExtensions = detectCPUextensions();
+-
+- // Check if MMX/SSE instruction set extensions supported by CPU
+-
+-#ifdef SOUNDTOUCH_ALLOW_MMX
+- // MMX routines available only with integer sample types
+- if (uExtensions & SUPPORT_MMX)
+- {
+- return ::new FIRFilterMMX;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_MMX
+-
+-#ifdef SOUNDTOUCH_ALLOW_SSE
+- if (uExtensions & SUPPORT_SSE)
+- {
+- // SSE support
+- return ::new FIRFilterSSE;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_SSE
+-
+- {
+- // ISA optimizations not supported, use plain C version
+- return ::new FIRFilter;
+- }
++ // ISA optimizations not supported, use plain C version
++ return ::new FIRFilter;
+ }
+diff -ru soundtouch.orig/source/SoundTouch/Makefile.am soundtouch/source/SoundTouch/Makefile.am +--- soundtouch.orig/source/SoundTouch/Makefile.am 2012-02-22 20:51:33.269140169 +0100 ++++ soundtouch/source/SoundTouch/Makefile.am 2012-02-22 20:53:39.136212215 +0100 +@@ -30,16 +30,13 @@ +
+ lib_LTLIBRARIES=libSoundTouch.la
+ #
+-libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp
++libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp BPMDetect.cpp PeakFinder.cpp
+
+
+ # Note by authore: '-msse2' might not work in non-X86 compilations. If someone can
+ # fix this script to automatically check for CPU architecture, please submit a patch
+ # to me.
+ AM_CXXFLAGS = -fcheck-new -I../../include
+-mmx_optimized.lo : AM_CXXFLAGS = -mmmx -fcheck-new -I../../include
+-sse_optimized.lo : AM_CXXFLAGS = -msse -fcheck-new -I../../include
+-
+
+ # other linking flags to add
+ # noinst_LTLIBRARIES = libSoundTouchOpt.la
+diff -ru soundtouch.orig/source/SoundTouch/TDStretch.cpp soundtouch/source/SoundTouch/TDStretch.cpp +--- soundtouch.orig/source/SoundTouch/TDStretch.cpp 2012-02-22 20:51:33.269140169 +0100 ++++ soundtouch/source/SoundTouch/TDStretch.cpp 2012-02-22 20:59:57.756604035 +0100 +@@ -738,35 +738,8 @@ +
+ TDStretch * TDStretch::newInstance()
+ {
+- uint uExtensions;
+-
+- uExtensions = detectCPUextensions();
+-
+- // Check if MMX/SSE instruction set extensions supported by CPU
+-
+-#ifdef SOUNDTOUCH_ALLOW_MMX
+- // MMX routines available only with integer sample types
+- if (uExtensions & SUPPORT_MMX)
+- {
+- return ::new TDStretchMMX;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_MMX
+-
+-
+-#ifdef SOUNDTOUCH_ALLOW_SSE
+- if (uExtensions & SUPPORT_SSE)
+- {
+- // SSE support
+- return ::new TDStretchSSE;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_SSE
+-
+- {
+- // ISA optimizations not supported, use plain C version
+- return ::new TDStretch;
+- }
++ // ISA optimizations not supported, use plain C version
++ return ::new TDStretch;
+ }
+
+
|