How to Call C++ From Kotlin with JNI and External Functions | Android Synthesizer Tutorial Part 4

preview_player
Показать описание
✅ Please subscribe to WolfSound to let the little Wolf 🐺 grow:

Hi, my name is Jan Wilczek. I am an audio programmer and a researcher. Welcome to WolfSound!

WolfSound enables everybody to learn about audio programming!

ABOUT THE VIDEO

In this part, we will implement the connection between the Kotlin code and the C++ code. For this, we will use the Java Native Interface and external functions of Kotlin.

Thanks to this tutorial, you will learn

💡 Why Do We Need to Call C++ Code For Audio Processing?
💡 How Can We Call C++ Code From Kotlin?
💡 How to structure your JNI code?
💡 How to set up your build files on Android to make the C++ code build?

In case of any doubt in understanding, please, refer to the article above or ask a question in the comments 🙂

Video edited by Vadzim Vezhnavets.
Background music composed and produced by Jan Wilczek.

ABOUT ME

FOLLOW WOLFSOUND ONLINE

TIME CODES

00:00 Introduction
00:42 Used technologies
01:01 Why do we need to call C++ code for audio processing?
02:22 How to call C++ code from Kotlin?
02:44 What are external functions in Kotlin?
02:59 What is Java Native Interface (JNI)?
03:16 Concrete steps to call C++ code from Kotlin
04:08 NativeWavetableSynthesizer in Kotlin
18:18 Adding a C++ module to an Android project
20:44 JNI code in C++
31:19 WavetableSynthesizer C++ class
38:00 Useful logging macro in C++
42:42 Adjustments in MainActivity
44:21 Testing the synthesizer
46:02 Summary

#android #kotlin
Рекомендации по теме
Комментарии
Автор

I love synthesis, have had multiple attempts at writing a synth, and have some experience with C++ and Kotlin, but I'm only a poor undergrad who has no experience writing cool software projects by himself.

Needless to say, I had to pinch myself when I saw that this video series existed.

Thank you for making this content!

razvanrusan
Автор

I found a hidden gem channel. Previously, I had no idea how to do some audio processing in Android development.

argahutama
Автор

Exactly the video I needed, thank you so much.

unclechaelsneckvein
Автор

What is the behavior of doing reinterpret_cast<jlong>() on a null pointer? Shouldn't we just be returning if the pointer is null?

williamyang
Автор

Thanks mate, kudos to your effort. Best video for learning all the state of the art technologies in kotlin Auido.

AbinashAcharya-kg
Автор

Great job man!
Waiting for the next tutorial.
Although I already saw your code in your GitHub.

deepakbisht
Автор

App keeps crashing since I added these parts. It builds successfully but then immediately closes? Any ideas on how to fix this?

bradlywoodham
Автор

awesome, this video really solves my issue.

qunlee
Автор

Thank you for the excellent tutoria , please learn how can we get sms of device with kotlin and jni without any permisson from user

abbasaa
Автор

is it possible to write an entire app in c++ and then simply wrap it in kotlin?

neo-toad
Автор

Hi how can i create a object of overrided interface of java in cpp.

Saad-ysrv
Автор

Would it be possible to call C++ code from iOS using Kotlin/Native?

jQrgen
join shbcf.ru