From 67a202aee87d5e49b567ea0e75a0bfa01a84f227 Mon Sep 17 00:00:00 2001 From: oparviai Date: Sun, 1 Apr 2012 20:00:09 +0000 Subject: [PATCH] minor patches --- README.html | 19 +++++++------------ source/SoundTouch/Makefile.am | 2 +- source/SoundTouch/cpu_detect_x86.cpp | 5 ++++- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.html b/README.html index 5cb6bb4..a750d62 100644 --- a/README.html +++ b/README.html @@ -16,8 +16,7 @@

SoundTouch audio processing library v1.6.1pre

-

SoundTouch library Copyright © Olli Parviainen -2001-2011

+

SoundTouch library Copyright © Olli Parviainen 2001-2012


1. Introduction

SoundTouch is an open-source audio processing library that allows @@ -64,13 +63,7 @@ executables. The make-win.bat script creates these directories automatically.

2.2. Building in Gnu platforms

The SoundTouch library compiles in practically any platform -supporting GNU compiler (GCC) tools. SoundTouch have been tested with -gcc version 4.4.5 at latest, but it shouldn't be very specific about -the gcc -version. Assembler-level performance optimizations for GNU platform are -currently available in x86 platforms only, and they are automatically -disabled and replaced with standard C routines in other processor -platforms.

+supporting GNU compiler (GCC) tools. SoundTouch requires GCC version 4.3 or later.

To build and install the binaries, run the following commands in /soundtouch directory:

@@ -136,8 +129,7 @@ x86 processors by running ./configure script with switch Alternatively, if you don't use GNU Configure system, edit file "include/STTypes.h" -directly and remove the following definition:

-
+directly and remove the following definition:
#define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1
@@ -357,7 +349,7 @@ from Athlon XP.

4. SoundStretch audio processing utility

SoundStretch audio processing utility
-Copyright (c) Olli Parviainen 2002-2010

+ Copyright (c) Olli Parviainen 2002-2012

SoundStretch is a simple command-line application that can change tempo, pitch and playback rates of WAV sound files. This program is intended primarily to demonstrate how the "SoundTouch" library can be @@ -508,6 +500,8 @@ and estimates the BPM rate:

5.1. SoundTouch library Change History

1.6.1:

Moral greetings to all other contributors and users also!


diff --git a/source/SoundTouch/Makefile.am b/source/SoundTouch/Makefile.am index a8bba5d..b081fb2 100644 --- a/source/SoundTouch/Makefile.am +++ b/source/SoundTouch/Makefile.am @@ -22,7 +22,7 @@ include $(top_srcdir)/config/am_include.mk # set to something if you want other stuff to be included in the distribution tarball -EXTRA_DIST=3dnow_win.cpp cpu_detect_x86.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj +EXTRA_DIST=SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj noinst_HEADERS=AAFilter.h cpu_detect.h cpu_detect_x86.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h diff --git a/source/SoundTouch/cpu_detect_x86.cpp b/source/SoundTouch/cpu_detect_x86.cpp index 8ec618a..d0b5ea7 100644 --- a/source/SoundTouch/cpu_detect_x86.cpp +++ b/source/SoundTouch/cpu_detect_x86.cpp @@ -83,7 +83,8 @@ uint detectCPUextensions(void) /// If building for a 64bit system (no Itanium) and the user wants optimizations. /// Return the OR of SUPPORT_{MMX,SSE,SSE2}. 11001 or 0x19. /// Keep the _dwDisabledISA test (2 more operations, could be eliminated). -#if defined(__GNUC__) && defined(__x86_64__) \ +#if ((defined(__GNUC__) && defined(__x86_64__)) \ + || defined(_M_X64)) \ && defined(SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS) return 0x19 & ~_dwDisabledISA; @@ -101,7 +102,9 @@ uint detectCPUextensions(void) // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. + // Check if no cpuid support. if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; // always disable extensions. + if (edx & bit_MMX) res = res | SUPPORT_MMX; if (edx & bit_SSE) res = res | SUPPORT_SSE; if (edx & bit_SSE2) res = res | SUPPORT_SSE2;