Esempio n. 1
0
 public RemotePluginInstance(IVstHostProcess vstHostProcess, Plugin plugin, bool backgroundProcessing = true,
                             bool debug = false)
 {
     Plugin          = plugin;
     _debug          = debug;
     _vstHostProcess = vstHostProcess;
     _vstHostProcess.Lock(plugin);
     Plugin.Logger.Debug($"Locking to PID {vstHostProcess.Pid}");
     _remoteVstService = vstHostProcess.GetVstService();
     RegisterPlugin(backgroundProcessing);
 }
        public IRemotePluginInstance GetRemoteInteractivePluginInstance(Plugin plugin,
                                                                        bool backgroundProcessing = true)
        {
            if (_interactiveVstHostProcess == null)
            {
                _interactiveVstHostProcess = new VstHostProcess(20, true);
                _interactiveVstHostProcess.Start();
                _interactiveVstHostProcess.WaitUntilStarted();
            }

            if (!_interactivePluginInstances.ContainsKey(plugin))
            {
                _interactivePluginInstances.Add(plugin,
                                                new RemotePluginInstance(_interactiveVstHostProcess, plugin, true, true));
            }

            return(_interactivePluginInstances[plugin]);
        }
 private void UnwatchProcess(IVstHostProcess process)
 {
     process.ProcessStateUpdated -= ProcessOnProcessStateUpdated;
 }