1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-11-09 12:22:51 +01:00

- Update documentation

- Updated version numbers to 1.9
- Disable OpenMP by default, to be enabled by developer
This commit is contained in:
oparviai 2015-05-18 15:28:41 +00:00
parent 83e46b5644
commit 76f76ffb84
6 changed files with 123 additions and 55 deletions

View File

@ -13,8 +13,8 @@
</head>
<body class="normal">
<hr>
<h1>SoundTouch audio processing library v1.8.1pre</h1>
<p class="normal">SoundTouch library Copyright © Olli Parviainen 2001-2014</p>
<h1>SoundTouch audio processing library v1.9</h1>
<p class="normal">SoundTouch library Copyright © Olli Parviainen 2001-2015</p>
<hr>
<h2>1. Introduction </h2>
<p>SoundTouch is an open-source audio processing library that allows
@ -34,9 +34,13 @@ same time</li>
<p>SoundTouch WWW page: <a href="http://soundtouch.surina.net">http://soundtouch.surina.net</a></p>
<hr>
<h2>2. Compiling SoundTouch</h2>
<p>Before compiling, notice that you can choose the sample data format
if it's desirable to use floating point sample data instead of 16bit
integers. See section "sample data format" for more information.</p>
<p>Before compiling, notice that you can choose the sample data format if it's
desirable to use floating point sample data instead of 16bit integers. See
section &quot;sample data format&quot; for more information.</p>
<p>Also notice that SoundTouch can use OpenMP instructions for parallel
computation to accelerate the runtime processing speed in multi-core systems,
however, these improvements need to be separately enabled before compiling. See
OpenMP notes in Chapter 3 below.</p>
<h3>2.1. Building in Microsoft Windows</h3>
<p>Project files for Microsoft Visual C++ are supplied with the source
code package. Go to Microsoft WWW page to download
@ -82,7 +86,9 @@ Notice that "configure" file is not available before running the
<pre>make -</pre>
</td>
<td>
<p>Builds the SoundTouch library &amp; SoundStretch utility.</p>
<p>Builds the SoundTouch library &amp; SoundStretch utility. You can
optionally add &quot;-j&quot; switch after &quot;make&quot; to speed up the compilation in
multi-core systems.</p>
</td>
</tr>
<tr valign="top">
@ -123,7 +129,7 @@ directly and remove the following definition:<blockquote>
<pre>#define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1</pre>
</blockquote>
<h4><b>2.2.3 Compiling Shared Library / DLL version</b></h4>
<h4><b>2.2.3 Compiling Shared Library / DLL version in Cygwin</b></h4>
<p>
The GNU compilation does not automatically create a shared-library version of
SoundTouch (.so or .dll). If such is desired, then you can create it as follows
@ -137,7 +143,15 @@ sstrip SoundTouch.dll</pre>
<h3>2.1. Building in Android</h3>
<p>Android compilation instructions are within the
source code package, see file &quot;<b>source/Android-lib/README-SoundTouch-Android.html</b>&quot;
in the package.</p>
in the source code package. </p>
<p>The Android compilation automatically builds separate .so library binaries
for ARM, X86 and MIPS processor architectures. For optimal device support,
include all these .so library binaries into the Android .apk application
package, so the target Android device can automatically choose the proper
library binary version to use.</p>
<p>The <strong>source/Android-lib</strong> folder includes also an Android
example application that processes WAV audio files using SoundTouch library in
Android devices.</p>
<hr>
<h2>3. About implementation &amp; Usage tips <h3>3.1. Supported sample data formats</h3>
@ -333,28 +347,55 @@ function with parameter&nbsp; id of SETTING_USE_QUICKSEEK and value
<p>setSetting(SETTING_USE_QUICKSEEK, 1);</p>
</blockquote>
<p><strong>CPU-specific optimizations:</strong></p>
<p>Intel x86 specific SIMD optimizations are implemented using compiler
intrinsics, providing about a 3x processing speedup for x86 compatible
processors vs. non-SIMD implementation:</p>
<ul>
<li> Intel MMX optimized routines are used with compatible CPUs when
16bit integer sample type is used. MMX optimizations are available both
in Win32 and Gnu/x86 platforms. Compatible processors are Intel
PentiumMMX and later; AMD K6-2, Athlon and later.</li>
<li> Intel SSE optimized routines are used with compatible CPUs when
floating point sample type is used. SSE optimizations are currently
implemented for Win32 platform only. Processors compatible with SSE
extension are Intel processors starting from Pentium-III, and AMD
processors starting from Athlon XP.</li>
<li> AMD 3DNow! optimized routines are used with compatible CPUs when
floating point sample type is used, but SSE extension isn't supported .
3DNow! optimizations are currently implemented for Win32 platform only.
These optimizations are used in AMD K6-2 and Athlon (classic) CPU's;
better performing SSE routines are used with AMD processor starting
from Athlon XP.</li>
<li> Intel MMX optimized routines are used with x86 CPUs when 16bit integer
sample type is used</li>
<li> Intel SSE optimized routines are used with x86 CPUs when 32bit floating
point sample type is used</li>
</ul>
<h3>3.5 OpenMP parallel computation</h3>
<p>SoundTouch 1.9 onwards support running the algorithms parallel in several CPU
cores. Based on benchmark the expected multi-core processing speed-up gain
ranges between +30% (on high-spec dual-core x86) to 170% (on moderately low-spec
quad-core ARM). </p>
<p>The parallel computing support is implemented using OpenMP spec 3.0
instructions. These instructions are supported by Visual C++ 2008 and later, and
GCC v4.2 and later. Compilers that do not supporting OpenMP will ignore these
optimizations and routines will still work properly. Possible warnings about
unknown #pragmas are related to OpenMP support and can be safely ignored.</p>
<p>The OpenMP improvements are disabled by default, and need to be enabled by
developer during compile-time. Reason for this is that parallel processing adds
moderate runtime overhead in managing the multi-threading, so it may not be
necessary nor desirable in all applications. For example real-time processing
that is not constrained by CPU power will not benefit of speed-up provided by
the parallel processing, in the contrary it may increase power consumption due
to the increased overhead.</p>
<p>However, applications that run on low-spec multi-core CPUs and may otherwise
have possibly constrained performance will benefit of the OpenMP improvements.
This include for example multi-core embedded devices.</p>
<p>OpenMP parallel computation can be enabled before compiling SoundTouch
library as follows:</p>
<ul>
<li><strong>Visual Studio</strong>: Open properties for the <strong>SoundTouch
</strong>sub-project, browse to <strong>C/C++</strong> and <strong>Language
</strong>settings. Set
there &quot;<strong>OpenMP support</strong>&quot; to &quot;<strong>Yes</strong>&quot;. Alternatively add
<strong>/openmp</strong> switch to command-line
parameters</li>
<li><strong>GNU</strong>: Run the configure script with &quot;<strong>./configure
--enable-openmp</strong>&quot; switch, then run make as usually</li>
<li><strong>Android</strong>: Add &quot;<strong>-fopenmp</strong>&quot; switches to compiler &amp; linker
options, see README-SoundTouch-Android.html in the source code package for
more detailed instructions.</li>
</ul>
<hr>
<h2><a name="SoundStretch"></a>4. SoundStretch audio processing utility
</h2>
<p>SoundStretch audio processing utility<br>
Copyright (c) Olli Parviainen 2002-2012</p>
Copyright (c) Olli Parviainen 2002-2015</p>
<p>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
@ -500,17 +541,29 @@ and estimates the BPM rate:</p>
<blockquote>
<pre>soundstretch stdin -bpm</pre>
</blockquote>
<p><strong>Example 6</strong></p>
<p>The following command tunes song from original 440Hz tuning to 432Hz tuning:
this corresponds to lowering the pitch by -0.318 semitones:</p>
<blockquote>
<pre>soundstretch original.wav output.wav -pitch=-0.318</pre>
</blockquote>
<hr>
<h2>5. Change History</h2>
<h3>5.1. SoundTouch library Change History </h3>
<p><b>1.8.1pre:</b></p>
<p><b>1.9:</b></p>
<ul>
<li>Added parallel computation support via OpenMP primitives for better performance in multicore systems.
Benchmarks show processing speedup improvement range from +30% (x86 dual-core) to +180% (ARM quad-core).</li>
<li>Replaced Windows-like 'BOOL' types with native 'bool'</li>
<li>Fixed bug in Android.mk make file</li>
<li>Added support for parallel computation support via OpenMP primitives for better performance in multicore systems.
Benchmarks show that achieved parallel processing speedup improvement
typically range from +30% (x86 dual-core) to +180% (ARM quad-core). The
OpenMP optimizations are disabled by default, see OpenMP notes above in this
readme file how to enabled these optimizations.</li>
<li>Android: Added support for Android devices featuring X86 and MIPS CPUs,
in addition to ARM CPUs.</li>
<li>Android: More versatile Android example application that processes WAV
audio files with SoundTouch library</li>
<li>Replaced Windows-like 'BOOL' types with native 'bool'</li>
<li>Changed documentation token to "dist_doc_DATA" in Makefile.am file</li>
<li>Removed -fcheck-new from gcc switches</li>
<li>Miscellaneous small fixes and improvements</li>
</ul>
<p><b>1.8.0:</b></p>
<ul>
@ -671,7 +724,7 @@ accessing the FIFOSampleBuffer class from external files.</li>
</ul>
<p>&nbsp;</p>
<h3>5.2. SoundStretch application Change History </h3>
<p><b>1.8.1:</b></p>
<p><b>1.9:</b></p>
<ul>
<li>Added support for WAV file 'fact' information chunk.</li>
</ul>
@ -734,9 +787,9 @@ switch "-bpm"</li>
<hr>
<h2>6. Acknowledgements </h2>
<p>Kudos for these people who have contributed to development or
submitted bugfixes since SoundTouch v1.3.1: </p>
submitted bugfixes:</p>
<ul>
<li> Arthur A</li>
<li> Arthur A</li>
<li> Richard Ash</li>
<li> Stanislav Brabec</li>
<li> Christian Budde</li>
@ -747,27 +800,23 @@ submitted bugfixes since SoundTouch v1.3.1: </p>
<li> David Clark</li>
<li> Patrick Colis</li>
<li> Miquel Colon</li>
<li> Jim Credland</li>
<li> Sandro Cumerlato</li>
<li> Justin Frankel</li>
<li> Masa H.</li>
<li> Jason Garland</li>
<li> Takashi Iwai</li>
<li> Thomas Klausner</li>
<li> Mathias Möhl</li>
<li> Yuval Naveh</li>
<li> Paulo Pizarro</li>
<li> Blaise Potard</li>
<li> RJ Ryan</li>
<li> Justin Frankel</li>
<li> Jason Garland</li>
<li> Masa H.</li>
<li> Takashi Iwai</li>
<li> Thomas Klausner</li>
<li> Mathias Möhl</li>
<li> Yuval Naveh</li>
<li> Paulo Pizarro</li>
<li> Blaise Potard</li>
<li> Michael Pruett</li>
<li> RJ Ryan</li>
<li> John Sheehy</li>
<li> Michael Pruett</li>
<li> Rajeev Puran</li>
<li> RJ Ryan</li>
<li> John Sheehy</li>
<li> Tim Shuttleworth</li>
<li> Albert Sirvent</li>
<li> John Stumpo</li>
<li> Katja Vetter</li>
</ul>
@ -789,6 +838,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
<hr><!--
$Id$ -->
<p>
<i>README.html file updated on April-2014</i></p>
<i>README.html file updated in May-2015</i></p>
</body>
</html>

View File

@ -19,7 +19,7 @@ dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
dnl Place - Suite 330, Boston, MA 02111-1307, USA
# Process this file with autoconf to produce a configure script.
AC_INIT(SoundTouch, 1.8.0, [http://www.surina.net/soundtouch])
AC_INIT(SoundTouch, 1.9.0, [http://www.surina.net/soundtouch])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([config/m4])
AM_CONFIG_HEADER([config.h include/soundtouch_config.h])

View File

@ -79,10 +79,10 @@ namespace soundtouch
{
/// Soundtouch library version string
#define SOUNDTOUCH_VERSION "1.8.0"
#define SOUNDTOUCH_VERSION "1.9.0"
/// SoundTouch library version id
#define SOUNDTOUCH_VERSION_ID (10800)
#define SOUNDTOUCH_VERSION_ID (10900)
//
// Available setting IDs for the 'setSetting' & 'get_setting' functions:

View File

@ -51,6 +51,27 @@
variable &quot;NDK&quot;. That's easiest done by adding the NDK path definition at end of
your <b>~/.bash_profile</b> file, for instance as follows:</p>
<pre> NDK=/cygdrive/d/Android/android-ndk-r6</pre>
<p><b>Enabling OpenMP parallel computing mode</b></p>
<p>
SoundTouch supports OpenMP for parallel computing in multi-core
environments, and these improvements can be enabled also in the Android
build. See the SoundTouch main README.html file for generic notes about the
OpenMP implementation.</p>
<p>
To enable OpenMP mode in Android compilation, edit file <strong>Android.mk</strong>
and enable the &quot;-fopenmp&quot; flag in LOCAL_CFLAGS and LOCAL_LDFLAGS variables.
This is done by removing hash # from before the following lines in the
Android.mk file, before compiling the library:</p>
<pre> LOCAL_CFLAGS += -fopenmp
LOCAL_LDFLAGS += -fopenmp</pre>
<p><strong>OpenMP COMPATIBILITY NOTE: </strong>Android NDK has a threading issue
(at least until NDK v10) that causes the native library crash with fatal signal
11 if calling OpenMP-improved routines from a background thread. SoundTouch has
a workaround for this issue in soundtouch-jni.cpp, and this workaround requires
calling function <strong>SoundTouch.getVersionString() </strong>from the Android
application's main thread at least once before calling other SoundTouch
processing routines. See the SoundTouch Android example application and comments
in the <strong>soundtouch-jni.cpp </strong>source code file for more details.</p>
<hr />
<h2>
Calling SoundTouch native routines from Android application</h2>

View File

@ -39,9 +39,10 @@ LOCAL_LDLIBS += -llog
# Custom Flags:
# -fvisibility=hidden : don't export all symbols
# -fopenmp : enable these flags to allow using OpenMP for parallel computation
LOCAL_CFLAGS += -fvisibility=hidden -I ../../../include -fdata-sections -ffunction-sections #-fopenmp
LOCAL_CFLAGS += -fvisibility=hidden -I ../../../include -fdata-sections -ffunction-sections
# OpenMP mode : enable these flags to enable using OpenMP for parallel computation
#LOCAL_CFLAGS += -fopenmp
#LOCAL_LDFLAGS += -fopenmp

View File

@ -53,7 +53,6 @@
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
OpenMP="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Release/SoundTouch.pch"
AssemblerListingLocation=".\Release/"
@ -210,7 +209,6 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
FloatingPointModel="2"
OpenMP="false"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Debug/SoundTouch.pch"
AssemblerListingLocation=".\Debug/"
@ -370,7 +368,6 @@
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
OpenMP="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\$(OutDir)/SoundTouch.pch"
AssemblerListingLocation=".\$(OutDir)/"