currently working on final year project for assigmnet, building an application using android studio and would like to use function (to analyze between two sound) using Aubio software but having problem how to integrate it.
Try asked ChatGPT but it won’t work, hoping people out there can help me solve this, Thankyou!
write code for JNI and Cmake but i dont know how to get the path to link with aubio
your text`#include <jni.h>
`#include "aubio.h"
extern "C" JNIEXPORT jstring JNICALL
Java_com_yourpackage_yourapp_MainActivity_stringFromJNI(
JNIEnv* env,
jobject /* this */) {
const char* aubio_version = aubio_version();
return env->NewStringUTF(aubio_version);
}
cmake_minimum_required(VERSION 3.4.1)
# Define the library
add_library(aubio SHARED
src/main/cpp/aubio-src/io/*.c
src/main/cpp/aubio-src/mathutils/*.c
src/main/cpp/aubio-src/fft/*.c
src/main/cpp/aubio-src/fvec/*.c
src/main/cpp/aubio-src/filter/*.c
src/main/cpp/aubio-src/music/*.c
src/main/cpp/aubio-src/onset/*.c
src/main/cpp/aubio-src/pitch/*.c
src/main/cpp/aubio-src/resample/*.c
src/main/cpp/aubio-src/source/*.c
src/main/cpp/aubio-src/sink/*.c
src/main/cpp/aubio-src/specdesc/*.c
src/main/cpp/aubio-src/tempo/*.c
src/main/cpp/aubio-src/utils/*.c
)
# Include directories
include_directories(src/main/cpp/aubio-src)
# Find dependencies
find_library(log-lib log)
# Link the library`
target_link_libraries(aubio ${log-lib})
F1058 NOR AMIRA NAJIHA BINTI Z is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.