diff --git a/source/Android-lib/.classpath b/source/Android-lib/.classpath
new file mode 100644
index 0000000..7bc01d9
--- /dev/null
+++ b/source/Android-lib/.classpath
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/source/Android-lib/.project b/source/Android-lib/.project
new file mode 100644
index 0000000..1f328a8
--- /dev/null
+++ b/source/Android-lib/.project
@@ -0,0 +1,33 @@
+
+
+ ExampleActivity
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/source/Android-lib/AndroidManifest.xml b/source/Android-lib/AndroidManifest.xml
new file mode 100644
index 0000000..b1f9798
--- /dev/null
+++ b/source/Android-lib/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/Android-lib/jni/Android.mk b/source/Android-lib/jni/Android.mk
index 9d67def..6a88196 100644
--- a/source/Android-lib/jni/Android.mk
+++ b/source/Android-lib/jni/Android.mk
@@ -23,13 +23,14 @@ include $(CLEAR_VARS)
LOCAL_MODULE := soundtouch
LOCAL_SRC_FILES := soundtouch-jni.cpp ../../SoundTouch/AAFilter.cpp ../../SoundTouch/FIFOSampleBuffer.cpp \
../../SoundTouch/FIRFilter.cpp ../../SoundTouch/cpu_detect_x86.cpp \
+ ../../SoundTouch/sse_optimized.cpp \
../../SoundTouch/RateTransposer.cpp ../../SoundTouch/SoundTouch.cpp \
../../SoundTouch/InterpolateCubic.cpp ../../SoundTouch/InterpolateLinear.cpp \
../../SoundTouch/InterpolateShannon.cpp ../../SoundTouch/TDStretch.cpp \
- ../../SoundTouch/BPMDetect.cpp ../../SoundTouch/PeakFinder.cpp
+ ../../SoundTouch/BPMDetect.cpp ../../SoundTouch/PeakFinder.cpp
# for native audio
-LOCAL_LDLIBS += -lgcc
+LOCAL_SHARED_LIBRARIES += -lgcc
# --whole-archive -lgcc
# for logging
LOCAL_LDLIBS += -llog
@@ -37,6 +38,6 @@ LOCAL_LDLIBS += -llog
#LOCAL_LDLIBS += -landroid
# don't export all symbols
# added "-marm" switch to use arm instruction set instead of thumb for improved calculation performance.
-LOCAL_CFLAGS += -Wall -fvisibility=hidden -I ../../../include -D ST_NO_EXCEPTION_HANDLING -fdata-sections -ffunction-sections -marm
+LOCAL_CFLAGS += -fvisibility=hidden -I ../../../include -D ST_NO_EXCEPTION_HANDLING -fdata-sections -ffunction-sections
include $(BUILD_SHARED_LIBRARY)
diff --git a/source/Android-lib/jni/Application.mk b/source/Android-lib/jni/Application.mk
index 4cc6c6b..9f0c50a 100644
--- a/source/Android-lib/jni/Application.mk
+++ b/source/Android-lib/jni/Application.mk
@@ -1,7 +1,7 @@
# $Id$
#
-# Build both ARMv5TE and ARMv7-A machine code.
+# Build library bilaries for all supported architectures
#
-APP_ABI := armeabi-v7a armeabi
+APP_ABI := all #armeabi-v7a armeabi
APP_OPTIM := release
diff --git a/source/Android-lib/lint.xml b/source/Android-lib/lint.xml
new file mode 100644
index 0000000..ee0eead
--- /dev/null
+++ b/source/Android-lib/lint.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/source/Android-lib/proguard-project.txt b/source/Android-lib/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/source/Android-lib/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/source/Android-lib/project.properties b/source/Android-lib/project.properties
new file mode 100644
index 0000000..4ab1256
--- /dev/null
+++ b/source/Android-lib/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-19
diff --git a/source/Android-lib/res/drawable-hdpi/ic_launcher.png b/source/Android-lib/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..288b665
Binary files /dev/null and b/source/Android-lib/res/drawable-hdpi/ic_launcher.png differ
diff --git a/source/Android-lib/res/drawable-mdpi/ic_launcher.png b/source/Android-lib/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..6ae570b
Binary files /dev/null and b/source/Android-lib/res/drawable-mdpi/ic_launcher.png differ
diff --git a/source/Android-lib/res/drawable-xhdpi/ic_launcher.png b/source/Android-lib/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..d4fb7cd
Binary files /dev/null and b/source/Android-lib/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/source/Android-lib/res/drawable-xxhdpi/ic_launcher.png b/source/Android-lib/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..85a6081
Binary files /dev/null and b/source/Android-lib/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/source/Android-lib/res/layout/activity_example.xml b/source/Android-lib/res/layout/activity_example.xml
new file mode 100644
index 0000000..fcb296f
--- /dev/null
+++ b/source/Android-lib/res/layout/activity_example.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/Android-lib/res/values/strings.xml b/source/Android-lib/res/values/strings.xml
new file mode 100644
index 0000000..7403f9f
--- /dev/null
+++ b/source/Android-lib/res/values/strings.xml
@@ -0,0 +1,7 @@
+
+
+
+ SoundTouch Example
+ Hello world!
+
+
diff --git a/source/Android-lib/res/values/styles.xml b/source/Android-lib/res/values/styles.xml
new file mode 100644
index 0000000..13a7798
--- /dev/null
+++ b/source/Android-lib/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/source/Android-lib/src/net/surina/ExampleActivity.java b/source/Android-lib/src/net/surina/ExampleActivity.java
new file mode 100644
index 0000000..d1f8e1c
--- /dev/null
+++ b/source/Android-lib/src/net/surina/ExampleActivity.java
@@ -0,0 +1,60 @@
+package net.surina;
+
+import net.surina.soundtouch.SoundTouch;
+import net.surina.soundtouchexample.R;
+import net.surina.soundtouchexample.R.id;
+import net.surina.soundtouchexample.R.layout;
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.widget.TextView;
+
+public class ExampleActivity extends Activity
+{
+ TextView textViewConsole;
+ StringBuilder consoleText = new StringBuilder();
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_example);
+
+ textViewConsole = (TextView)findViewById(R.id.textViewResult);
+
+ // Check soundtouch
+ checkLibVersion();
+ }
+
+
+
+ @Override
+ protected void onDestroy()
+ {
+ textViewConsole = null;
+ }
+
+
+ /// Append text to console on the activity
+ public void appendToConsole(String text)
+ {
+ if (textViewConsole == null) return;
+ consoleText.append(text);
+ consoleText.append("\n");
+ textViewConsole.setText(consoleText);
+ }
+
+
+
+ /// print SoundTouch native library version onto console
+ protected void checkLibVersion()
+ {
+ SoundTouch st = new SoundTouch();
+
+ String ver = st.getVersionString();
+ appendToConsole("SoundTouch native library version = " + ver);
+ }
+
+}
diff --git a/source/Android-lib/src/net/surina/soundtouch/SoundTouch.java b/source/Android-lib/src/net/surina/soundtouch/SoundTouch.java
index 9f75692..40a6f8c 100644
--- a/source/Android-lib/src/net/surina/soundtouch/SoundTouch.java
+++ b/source/Android-lib/src/net/surina/soundtouch/SoundTouch.java
@@ -19,7 +19,7 @@ public final class SoundTouch
{
// Native interface function that returns SoundTouch version string.
// This invokes the native c++ routine defined in "soundtouch-jni.cpp".
- public native final String getVersionString();
+ public native final static String getVersionString();
// Load the native library upon startup
static