This project has moved. For the latest updates, please go here.

How to check instrument program count?

Nov 18, 2010 at 10:28 AM

How to check instrument program count / presets count ? When I calling set preset with number that is out of preset count range - application crashes. Thank's in advance for help.

Coordinator
Nov 18, 2010 at 10:39 AM

The PluginInfo property on the VstPluginContext contains an instance of VstPluginInfo. http://vstnet.codeplex.com/SourceControl/changeset/view/50709#994245

This contains a program count and a parameter count.

Note that some plugins have dynamic counts for both these parameters.
The AcceptPluginInfoData method on the VstPluginContext will load new PluginInfo values if the plugin has updated them. (Note that this does not work yet for managed plugins).

Hope it helps.
Marc