hey guys , is there known issues regarding the use...
# android
a
hey guys , is there known issues regarding the use of Kotlin with NDK ? i was using superpoweredsdk with kotlin and found out that maybe primitive data types are being altered when using JNI methods , because the output sound has latency and not the original pitch of the audio track is being played , while in java everything is normal , i am now forced to work with java , any thoughts ?
e
Off-hand guess is that your primitives get boxed, a process which you may easily miss in Kotlin, since it doesn't make syntactic difference between boxed and unboxed type. So it gets boxed and instead of its value you pass a pointer into JNI. Anyways, I guess the problem is with boxing.
👍 1
g
We use Kotlin and NDK (also for audio) don't have any issues Latency may be related to boxing but changed pitch is something really strange and looks as a some problem in your code. Maybe you could show some code
👍 1
a
thank you
i'm new to c++ and to pointers , i just wanted a lead as it was a dead end for me , thank you guys really helpful !