Custom Plug-in instrument with audiofile loading

I’m working on a custom plug-in instrument that allows to load an audiofile and then process that audio.

I think I have the basic idea down; I’ve created a plugin with 0 input buffers and a data parameter, that allows to drag & drop the audio file onto the plugin. But I don’t quite understand the next steps regarding the actual use of the audio; do I need to create a sound object? If so, how do I create an instance of System within a plugin? I’m having trouble putting the stuff from the docs and API reference together on this.

Some guidance would be much appreciated.

Thank you!

Edit:
Managed to get it working by writing the audio file to a buffer instead of using a sound object.

This is the correct way to go about it. Since the FMOD system and API isn’t actually exposed to DSP plugins, it’s not possible to create Sound objects with them - you need to store the loaded audio data in a buffer, and provide the audio data to the output buffer in the relevant DSP callbacks (i.e. FMOD_DSP_READ_CALLBACK or FMOD_DSP_PROCESS_CALLBACK).