So, I\'m using the FMOD api and it really is a C api.
Not that that\'s bad or anything. Its just it doesn\'t interface well with C++ code.
For example, usin
You cannot directly pass a member function. A member function has the implicit parameter this
and C functions don't.
You'll need to create a trampoline (not sure the signature of the callback, so just doing something random here).
extern "C" int fmod_callback( ... args ...)
{
return object->member();
}
One issue is where does that object pointer come from. Hopefully, fmod gives you a generic context value that will be provided to you when your callback is made (you can then pass in the object pointer).
If not, you'll just need to make it a global to access it.