How to inherit from AudioPluginInstance


I try to do an augmented plugin object. (with more function like dry, wet, gain in, gain out)

I would like to have a class AugmentedAudioPluginInstance which inherit from AudioPluginInstance, with a ctor like this :

AugmentedAudioPluginInstance::AugmentedAudioPluginInstance(AudioPluginInstance* plug);


But I didn't found a pretty way to implement this now.


Could someone please guide me ?

Thanks a lot,




in AudioPluginInstance, it is written :

    This class is not needed when writing plugins, and you should never need to derive

    your own sub-classes from it. The plugin hosting classes use it internally and will

    return AudioPluginInstance objects which wrap external plugins.

I think you want to inherit from AudioProcessor instead

Hi lalala,


Why not, but what i would like to do is to keep all my object properties. Even with an Audioprocessor object, the only solution i found is to use composition instead of inheritance, like this :

void processBlock(...){



I have to do it for each method, which does a lot of useless code and useless overheads.

no, you should totally use inheritance :

class AugmentedAudioPluginInstance : public AudioProcessor



that's should be fine!

here is recent open source project if you need an example of such a pluginAudioProcessor :


obviously there's many thing in there that you don't want, but that should get you started pretty well. and the code style is totally jucy! :)

Thank you for your response lalala,

But with your code you can't create an SAFEAudioProcessor from an existing AudioProcessor, and that is what I'm trying to do.


So I did a class inheriting from AudioProcessor, with a private member AudioProcessor mPlugin

I overrided every function from AudioProcessor, and now it works fine.

I also overrided AudioProcessorEditor to enlarge the window and put 4 new knobs (dry, wet, gain In gain out)

I will clean the code before posting.

Thanks you for your help lalala and good night,