private VstPluginContext OpenPlugin(string pluginPath) { _host = new HostCommandStub(); var ctx = VstPluginContext.Create(pluginPath, _host); ctx.Set("PluginPath", pluginPath); ctx.Set("HostCmdStub", _host); ctx.PluginCommandStub.SetSampleRate(1000 * _host.GetSampleRate()); ctx.PluginCommandStub.Open(); return(ctx); }
private VstPluginContext OpenPlugin(string pluginPath) { try { _host = new HostCommandStub(); var ctx = VstPluginContext.Create(pluginPath, _host); ctx.Set("PluginPath", pluginPath); ctx.Set("HostCmdStub", _host); ctx.PluginCommandStub.SetSampleRate(1000 * _host.GetSampleRate()); ctx.PluginCommandStub.Open(); return(ctx); } catch (Exception e) { MessageBox.Show(e.Message + Environment.NewLine + e.StackTrace); } return(null); }