I recently received a bug report for my VST host that it was crashing with Independence, and upon some investigation I discovered that the plugin declared an I/O configuration of 0/24 and the host was more or less hardcoded for stereo. In the case of mono plugins I just ignored the second channel, and most VST plugins seem to be 0/2 or 2/2 (for instruments/effects, respectively), so this limitation never seemed terribly wasteful or dangerous.
However, when I process audio from Independence, it always causes memory corruption when trying to write output channels 3-24. I could fix this issue by matching the I/O config of the plugin, but I'd rather tell the plugin that I only need 2 outputs back and spare it from having to process the other 22.
How do I do this? The relevant host -> plugin dispatcher calls which I've found are effSetSpeakerArrangement, which no plugins seem to support. There's also effConnectInput/effConnectOutput, but they were deprecated in 2.4, so I suspect that many plugins won't respond to them.
Is there a more elegant way to set the desired I/O configuration for a plugin, or should I just buck up and deal with the plugin's I/O config and allocate more channels for it?
Host->Plug-In setting channel count
-
- KVRist
- 334 posts since 18 Apr, 2005 from Sweden
:: Teragon Audio ::
-
- KVRAF
- 1940 posts since 16 Aug, 2004 from Vienna, Austria
AFAIR, if the PlugIn doesn't support setSpeakerArrangement, you have to give the PlugIn as many buffers as it needs in process((Double)Replacing)() - but of course nobody prevents you from passing the same buffer address for channels 3-24 and ignoring that buffer later.
[Edit:] Independence has a "Preferences" tab where you can change the output configuration - but it requires a restart to take effect, so even if the host supports speaker arrangements, Independence doesn't.
[Edit:] Independence has a "Preferences" tab where you can change the output configuration - but it requires a restart to take effect, so even if the host supports speaker arrangements, Independence doesn't.
-
- KVRist
- Topic Starter
- 334 posts since 18 Apr, 2005 from Sweden
Thanks, I guess you're right. I'm a bit disappointed that there's not a nicer way to do this, but as you said, just because I need to allocate the memory for the plugin doesn't mean I have to care about it. 
:: Teragon Audio ::
