android - How to notify java or 'listen' to End-Of-File event in Superpowered player callbacks -


i started using superpowered native sdk music player app project stuck passing method java end-of-file event in superpoweredadvancedaudioplayer callback. please pardon me if doing wrong new using native jni c side of android. attempt or appreciated. thank in advance.

    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 notify java end of file takes place here.  please suggest line of code or method can notify  android when event kicks in. personally, have searched online,  found similar "interface" method on java side  have no idea about. please help*      }else if (event == superpoweredadvancedaudioplayerevent_loaderror) {               delete playera;         }     } 

calling java native layer more complex calling native layer java. furthermore, blocking native threads processing audio java not recommended practice (you'll hear audio glitches). therefore recommend take inverse approach.

set variable when eof, , poll variable periodically (like every 50 ms) java, calling native layer.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -