C++ - access variables on static void functions -


this callback-function (alog debugging)

static void playereventcallbacka(void *clientdata, superpoweredadvancedaudioplayerevent event, void *value) {     alog("###################### callback player a.... ");     if (event == superpoweredadvancedaudioplayerevent_loadsuccess) {         alog("###################### callback player a.... loaded");          superpoweredadvancedaudioplayer *playera = *((superpoweredadvancedaudioplayer **)clientdata);                 playera->setbpm(126.0f);         playera->setfirstbeatms(353);         playera->setposition(playera->firstbeatms, false, false);     }; } 

i need set bpm here, have detected on other function in class. how can manage this?

you cannot, since static function has no this parameter. can access static members, or send object of needed type static function.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -