我开始为我的音乐播放器应用程序项目使用 Superpowered 本机 SDK,但我在 SuperpoweredAdvancedAudioPlayer 回调中将方法从 End-Of-File 事件传递给 java 时遇到了困难。如果我做错了,请原谅我,因为我是使用 Android 原生 JNI C 端的新手。非常感谢任何尝试或帮助。先感谢您。
static void playerEventCallbackA(void *clientData, SuperpoweredAdvancedAudioPlayerEvent event, void *value) {
SuperpoweredAdvancedAudioPlayer *playerA = *((SuperpoweredAdvancedAudioPlayer **)clientData);
if (event == SuperpoweredAdvancedAudioPlayerEvent_LoadSuccess) {
}else if (event == SuperpoweredAdvancedAudioPlayerEvent_EOF && !playerA->looping) {
*The event to notify Java for end of file takes place here.
Please help to suggest any line of code or method that can notify
Android when this event kicks in. Personally, I have searched online,
all I found similar was an "Interface" method on java side which
I have no idea about. Please help*
}else if (event == SuperpoweredAdvancedAudioPlayerEvent_LoadError) {
delete playerA;
}
}