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
Post a Comment