How to limit plugin to only one instance
-
- KVRist
- Topic Starter
- 459 posts since 21 Nov, 2012 from Sitting in front of my PC
Hi Guys
Anyone know if it's possible to inform a host DAW not to instantiate more than one instance of my plugin.
I can't find a way to have my plugin close it's self without leaving the host window still open.
I'm using VstSdk 2.4
Ta Kirsty
Anyone know if it's possible to inform a host DAW not to instantiate more than one instance of my plugin.
I can't find a way to have my plugin close it's self without leaving the host window still open.
I'm using VstSdk 2.4
Ta Kirsty
- KVRAF
- 7865 posts since 12 Feb, 2006 from Helsinki, Finland
Not really possible. The best you can do is detect that one instance is already open (eg. by using a global variable) and then instantiate dummy placeholder plugins instead (eg. simple pass-thru audio and a simple GUI that says only one instance is allowed, or something). Note that you pretty much have to return some sort of valid plugin, because some hosts will crash otherwise (eg. if you try to return null-pointer in order to indicate a failure; I think the spec might allow this, but it doesn't work in practice). If you want to play it safe, also give the dummy placeholder plugin at least one dummy parameter, because if I recall correctly, some hosts really don't like it when a plugin has none.kirsty roland wrote: ↑Sat Nov 30, 2019 3:47 pm Anyone know if it's possible to inform a host DAW not to instantiate more than one instance of my plugin.
I can't find a way to have my plugin close it's self without leaving the host window still open.
I'm using VstSdk 2.4
-
- KVRist
- Topic Starter
- 459 posts since 21 Nov, 2012 from Sitting in front of my PC
Thanks
I'll see if I can come up with a work around to avoid the situation altogether.
I'll see if I can come up with a work around to avoid the situation altogether.