I found this on GitHub which is a wrapper for the great SoundTouch C++ library.
I'm completely new to NDK though, so would any of you kindly explain to me how to set it up correctly?
I downloaded the zip from GitHub and copied the directories into my existing project. Still, it couldn't find the native C++ functions.
I tried compiling the library using ndk-build but I got two errors. This is my terminal log:
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
Android NDK: WARNING:/home/daniele/AndroidStudioProjects/Chords2/app/jni/Android.mk:soundtouch: non-system libraries in linker flags: -lgcc
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/daniele/AndroidStudioProjects/Chords2/app/jni/Android.mk:soundtouch: non-system libraries in linker flags: -lgcc
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi-v7a] Compile++ thumb: soundtouch <= soundtouch-jni.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= AAFilter.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= FIFOSampleBuffer.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= FIRFilter.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= cpu_detect_x86.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= RateTransposer.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= SoundTouch.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= TDStretch.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= BPMDetect.cpp
[armeabi-v7a] Compile++ thumb: soundtouch <= PeakFinder.cpp
[armeabi-v7a] SharedLibrary : libsoundtouch.so
[armeabi-v7a] Install : libsoundtouch.so => libs/armeabi-v7a/libsoundtouch.so
[armeabi] Compile++ thumb: soundtouch <= soundtouch-jni.cpp
/home/daniele/AndroidStudioProjects/Chords2/app/jni/soundtouch-jni.cpp:133:2: error:
no matching function for call to 'convertInput16'
convertInput16(ar, fBufferIn, BUFF_SIZE);
^~~~~~~~~~~~~~
/home/daniele/AndroidStudioProjects/Chords2/app/jni/soundtouch-jni.cpp:58:13: note:
candidate function not viable: no known conversion from
'soundtouch::SAMPLETYPE *' (aka 'short *') to 'float *' for 2nd argument
static void convertInput16(jbyte*, float*, int);
^
/home/daniele/AndroidStudioProjects/Chords2/app/jni/soundtouch-jni.cpp:210:16: error:
no matching function for call to 'write'
processed += write(fBufferIn, fBufferOut, nSamples * cha...
^~~~~
/home/daniele/AndroidStudioProjects/Chords2/app/jni/soundtouch-jni.cpp:56:12: note:
candidate function not viable: no known conversion from
'soundtouch::SAMPLETYPE *' (aka 'short *') to 'const float *' for 1st
argument
static int write(const float*, queue<signed char>*, int, int);
^
2 errors generated.
make: *** [/home/daniele/AndroidStudioProjects/Chords2/app/obj/local/armeabi/objs/soundtouch/soundtouch-jni.o] Error 1
