On this Kotlin version of the app I used JNAerator to automatically generate binding for libfluidsynth.so, but it was a failure. The generated code does not seem to reflect the API exactly (e.g. new_fluid_synth() returns PointerByReference, whereas it should return Pointer) and it's causing run time failure at AudioDriver.ctor() which in turn calls FluidsynthLibrary.new_fluid_audio_driver() and reports that "(...).new_fluid_audio_driver(...) should not be null", with no further hints (arguments were non-null at least by the Java debugger on Android Studio).
The binding could be manually written, but it's going to be a lot of work and so far there is little benefit on trying to write the entire app in Kotlin/JVM.
On this Kotlin version of the app I used JNAerator to automatically generate binding for libfluidsynth.so, but it was a failure. The generated code does not seem to reflect the API exactly (e.g.
new_fluid_synth()
returnsPointerByReference
, whereas it should returnPointer
) and it's causing run time failure atAudioDriver.ctor()
which in turn callsFluidsynthLibrary.new_fluid_audio_driver()
and reports that "(...).new_fluid_audio_driver(...) should not be null", with no further hints (arguments were non-null at least by the Java debugger on Android Studio).The binding could be manually written, but it's going to be a lot of work and so far there is little benefit on trying to write the entire app in Kotlin/JVM.