This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

See [LGPL v2.1 full license text ](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) for details.

--

Also commercial license free of GPL limitations available upon request

Machine environment for the Android development environment installation.

Having the Android developer environment setup in dedicated Virtual Machine

allows keeping all these settings isolated from your other PC operations, and

eases taking backup snapshots of your full development environment.</p>

<p><b>Compiling</b></p>

<p>

To compile the SoundTouch library source codes into an Android native library,

open Cygwin/bash shell, go to directory <b>&quot;soundtouch/source/Android-lib/jni&quot;</b> and invoke the NDK

compiler with following command:</p>

<pre> $NDK/ndk-build</pre>

<p>This will build binaries for all the supported Android platforms (arm-v5, arm-v7, X86, MIPS etc) of SoundTouch library, plus the JNI wrapper interface as discussed below. The target binaries will be built into the &quot;libs&quot; subdirectory. As long as all these .so binary library versions are included in the APK Application delivery package, the targer Android device can choose the correct library version to use. </p>

<p>Notice that to allow Cygwin/bash to locate the NDK compile scripts, you

need to define the location of the NDK installation defined in environment

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

implement and integrate the desired SoundTouch library capabilities into your own Android application.</p>

<hr/>

<h2>

Android floating-point performance considerations</h2>

<p>

The make process will build dedicated binaries for each supported Android CPU hardware platform type.

</p><p>SoundTouch uses floating-point algorithms for ideal sound quality on all other platform than in the lowest-end ARMv5. That is because lowest-end Android devices are not guaranteed to

have floating-point hardware in their CPUs, so that the ARMv5 compilation uses by default software-emulation for floating-point calculations to allow running the binary executables also in low-end devices without floating-point hardware.<p>

As floating point software-emulation is however several tens of times slower

than real hardware-level floating-point calculations, that would make running

floating-point-intensive applications such as SoundTouch infeasible in these low-end

devices. As workaround, the SoundTouch Android compilation builds the ARMv5 version using integer algorithm versions. The integer

algorithm version compromises the sound quality but provides good performance also

with low-end devices without hardware floating-point support in the CPU level.</p>

<p>When Android devices with more capable device is used, the device will automatically choose a proper library version for ideal sound quality.</p>