diff --git a/include/STTypes.h b/include/STTypes.h
index c11a9d9..e5633b9 100644
--- a/include/STTypes.h
+++ b/include/STTypes.h
@@ -172,6 +172,7 @@ namespace soundtouch
#else
// use c++ standard exceptions
#include
$NDK/ndk-build-
This will build the ARMv5 and ARMv7 versions of SoundTouch library (including - also the example JNI - interface, see below) into the "libs" subdirectory.
+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 "libs" 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.
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 "NDK". That's easiest done by adding the NDK path definition at end of your ~/.bash_profile file, for instance as follows:
NDK=/cygdrive/d/Android/android-ndk-r6
- Default build target for - Android NDK is ARMv5 CPU generation, as that works in - all ARM-based Android devices.
- This has a pitfall though: For ideal sound quality SoundTouch should be compiled - to use floating-point algorithms, however, all low-end Android devices do not - have floating-point hardware in their CPUs, and hence the default ARMv5 compilation uses software-emulation for floating-point calculations instead of - hardware floating-point to allow running the binary executables also in low-end devices.
- The floating point software-emulation is however several tens of times slower - than real hardware-level floating-point calculations, making - floating-point-intensive applications such as SoundTouch infeasible with low-end - devices.
- As workaround, the SoundTouch Android compilation builds two separate versions - of the library:
- These two library compilations are already defined in file "jni/Application.mk" - so that these two separate library targets are automatically built under the "libs" - directory. As far as you include both these compiled library versions into your - application delivery, the Android devices can automatically select the right - library version based on the available device's capabilities.
- Please yet be aware that depending on capabilities of the Android devices you - will need to provide the SoundTouch routines with samples in either integer or - floating-point format, so build your interface routines to take this into - account.
The NDK tools build the SoundTouch c++ routines into a native binary library, while @@ -96,23 +60,42 @@ Interface (JNI).
The SoundTouch source code package provides source code example how to - use JNI to call native c++ routines from a Java class through the following - source code file pair:
Feel free to examine and extend the provided cpp/java source code example file pair to - implement and integrate the desired SoundTouch library capabilities into your Android application.
+ implement and integrate the desired SoundTouch library capabilities into your own Android application. ++ The make process will build dedicated binaries for each supported Android CPU hardware platform type. +
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.
+ 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.
+When Android devices with more capable device is used, the device will automatically choose a proper library version for ideal sound quality.
Copyright © Olli Parviainen