It’s fine when you have the plugin in unstable, you can do all you want there.
But if you want to get the plugin into stable, we need to have some assurances that it will work correctly.
It’s great that you have got a working plugin already, but the last steps now are the boring and painful ones…
Because it’s your first plugin, it’s understandable that you missed a few obvious things.
I don’t want to be rude, but it’s perhaps better if you learn more about programming first.
You mention you fixed the leaks before, but for example the engineMkI, engineOpl and engineMsfa objects that you allocate on the class constructor are never deleted.
I also see several class static functions being called on the constructor, which tells me the plugin has global state. I mean this:
I did not check what those do, but calling such methods on each plugin instance load is certainly wrong.
If they change some global state, then you might get weird sounds (or crash) if you load a new dexed instance while one is playing notes at the same time.
Globals are a big no when it comes to plugins, as we have them running concurrently on different threads.
It’s really out of the scope of MOD to coach each developer how to do plugins, specially how to do them properly. Audio plugins are not specific to MOD, so there are a lot of existing resources out there to learn from.
The conditions that apply to LV2 plugins for MOD are the same for all other plugins, for example:
- no global state
- no locking, [de]allocation, printf, writing to files, or any other non-rt-safe operation on processing thread
- don’t assume block size (some hosts even split the buffer, it’s never constant)
Here comes the usual link http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
Of course not all plugins do this, even commercial ones.
But then the user is the one that has to deal with it…
Other things like proper cleanup, checking for errors and handling them in a reasonable matter - those are common to all software, not just audio plugins. If you want your plugin to be seen in a commercial product, then you really need to pay attention to these details.