예제 #1
0
        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);
        }
예제 #2
0
        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);
        }