I’m looking to create a variable number of plugins at run time depending on the existence of external files in my plugin folder. That part is pretty straight forward but I wish to use the same generic callback functions for each of the loaded plugins. For example, if there are 3 plugins to be created at runtime, they will all use my FMOD_GenericPlugin_dspcreate() callback. But I need to know which plugin instance has been loaded. Is there any way I can access the plugin’s FMOD_DSP_DESCRIPTION struct in any of the callback methods?
There’s not really any way to do what you’re asking. I suggest looking at alternatives that don’t share a generic create function.
Got it done using the original advice I was given, i.e, to use GetUserData(). With it I can pass everything I need to my generic callbacks making each one of them behave differently. Thanks to everyone who helped on this one!