public VstPluginInfo GetPluginInfo(IVstHostCommandProxy hostCmdProxy)
        {
            //
            // get the path to the wrapped plugin from config
            //

            if (PluginConfiguration == null)
            {
                throw new InvalidOperationException("No plugin configuration found.");
            }

            var pluginPath = PluginConfiguration["PluginPath"];

            Host.HostCommandStubAdapter hostCmdAdapter = new Host.HostCommandStubAdapter(hostCmdProxy);
            _pluginCtx = VstPluginContext.Create(pluginPath, hostCmdAdapter);

            return(_pluginCtx.PluginInfo);
        }
Exemplo n.º 2
0
        public VstPluginInfo GetPluginInfo(IVstHostCommandStub hostCmdStub)
        {
            //
            // get the path to the wrapped plugin from config
            //

            if (PluginConfiguration == null)
            {
                throw new ApplicationException("No plugin configuration found.");
            }

            KeyValueConfigurationElement configElem = PluginConfiguration.AppSettings.Settings["PluginPath"];

            if (configElem == null)
            {
                throw new ApplicationException("The 'PluginPath' configuration (app) setting was not found.");
            }

            Host.HostCommandStubAdapter hostCmdAdapter = new Host.HostCommandStubAdapter(hostCmdStub);
            _pluginCtx = VstPluginContext.Create(configElem.Value, hostCmdAdapter);

            return(_pluginCtx.PluginInfo);
        }