Where does Delphi/Android search for a native language library?

前端 未结 1 1818
醉话见心
醉话见心 2021-01-02 10:17

I want to add MIDI capabilities to Delphi Android apps. MIDI is available via the SoniVox library which can be accessed via the Android NDK. An example of this driver can be

相关标签:
1条回答
  • 2021-01-02 10:31

    NDK libraries that are used by Delphi should be placed in <path to your PlatformSDKs>\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib. I realised this thanks the recommendations of Arioch and Chris to use the NDK directly. Most android files in the Source\rtl\android directory include the file Androidapi.inc which contains the following definitions

    const
        AndroidLib            = '/usr/lib/libandroid.so';
        AndroidJniGraphicsLib = '/usr/lib/libjnigraphics.so';
        AndroidEglLib         = '/usr/lib/libEGL.so';
        AndroidGlesLib        = '/usr/lib/libGLESv1_CM.so';
        AndroidGles2Lib       = '/usr/lib/libGLESv2.so';
        AndroidLogLib         = '/usr/lib/liblog.so';
        AndroidOpenSlesLib    = '/usr/lib/libOpenSLES.so';
    

    The directory /usr/lib does not exist on the Nexus-7 but I found it in the path mentioned above with all the files declared in the const part. Copying the libmidi.so to this directory solved the problem. I now have the not so minor problem of hearing no sound. I'll try to solve that now, as well as trying to call the NDK directly.

    0 讨论(0)
提交回复
热议问题