How to load third-party plugins

I have successfully used the “Resonance Audio” plugin in my Fmod Studio project and packaged it as a bank.
But when loading in my C++API project, I encountered a problem.
I thought copying ‘resonanceaudio. dll’ to the same directory as exe would solve this problem, but he still reported an error.
The error is as follows:
[WRN] PluginEffectModel::init : Missing DSP plugin ‘Resonance Audio Listener’
[ERR] PostLoad::initPluginEffects : DSP plugin returned an error, bank will not load properly.
I couldn’t find the plugin, but later I discovered function “loadPlugin” and “registerPlugin”.
May I ask how I should use them? Besides these, what else do I need to do to successfully use plugins in my project.
Thank you.

Hi,

Correct, you will need to call System::loadPlugin() using the directory location of the resonanceaudio.dll as the first argument:

coreSystem->loadPlugin("C:\\Program Files\\FMOD SoundSystem\\FMOD Studio 2.02.18\\plugins\\resonanceaudio.dll", &handle);

The handle is just an unsigned int. As you have assigned the DSP in FMOD Studio you will not have to call System::createDSPByPlugin or System::setOutputByPlugin.
Remember to call System::unloadPlugin (FMOD Engine | Core API Reference - System) using the handle you created when loading the plugin at the end of your program.

Hope this helps!

Thank you, I will try it later.
What is the use of registerPlugin in the Fmod Studio API? It seems that the parameters are quite complex.

Hi,

registerPlugin allows you to define DSP functionality via code in the FMOD_DSP_DESCRIPTION to then be used by the FMOD system. That is why it is so complex, it allows for user-defined DSP effects (FMOD Engine | Plugin API reference - DSP)

Hope this helps!