mail2chromium / Android-Audio-Processing-Using-WebRTC

All in all WebRTC. A Complete Guide to enable Rich and High Quality of **Real-Time Voice Communication** on Android Platform. This repository involves a complete understanding, implementation and documentation related to WebRTC Audio Processing.
144 stars 49 forks source link

System.loadLibrary("soundtouch") cause fatal crash #2

Closed ipdental closed 4 years ago

ipdental commented 4 years ago

System Information: OS: Windows 10 64bit IDE: Android Studio 3.6.2 JDK 1.8 NDK r21

Steps to Repro: Downloaded git On Sync Build I get following message in red color 17:00 Unsupported Modules Detected: Compilation is not supported for following modules: Android-Audio-Processing-Using-WebRTC. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project. On running the code, system crashes at runtime on calling System.loadLibrary("soundtouch") in JNISoundTouch class

Question - What am I doing something wrong here? Since I am a newbie to Android. How can I correct it.

mail2chromium commented 4 years ago

Sorry for being late. I have compiled the Library using NDK-r13, also by using NDK-r20. I will update you after checking it with NDK-r21. For now, try these following steps:

0- Go to File -> Invalidate Caches/Restart

1- Close the project

2- Close Android Studio IDE

3- Delete the .idea directory

4- Delete all .iml files

5- Open Android Studio IDE and import the project

I hope, it will work.

ipdental commented 4 years ago

It is not about NDK version.

The error is that JNI files for "soundtouch" are missing.

mail2chromium commented 4 years ago

Oh, my mistake! I just forgot to compile the library for both architectures libsoundtouch.so, libsoundtouch.so. You can check this library and again use it. Hopefully, it will work.

ipdental commented 4 years ago

No Android Studio will require everything. Source, wrapper cpp, .mk files everything.

mail2chromium commented 4 years ago

@ipdental, When you have just a compiled file which is either of static (*.a) or a shared library(*.so), then you can use them in your project. There is no need for any kind of

until and unless you want them to recompile and rebuild by yourself or want changes in your native stack. So, for this project, I have already compiled these files and there are present in libs directory. If you want to build your own library, then have a look at this Android-Native-Development-For-WebRTC. Good luck!