/// <summary> /// Creates a <see cref="VstParameterManager"/> instance for the specified <paramref name="paramInfo"/> (this). /// </summary> /// <param name="paramInfo">Must not be null</param> /// <param name="hostAutomation">Can be null</param> /// <returns>Never returns null.</returns> public static VstParameterManager ToManager(this VstParameterInfo paramInfo, IVstHostAutomation hostAutomation) { return(new VstParameterManager(paramInfo) { HostAutomation = hostAutomation }); }
private IVstHostAutomation CreateAutomation(IVstHostAutomation instance) { if (instance == null) { return(new VstHostAutomation(_host)); } return(instance); }
/// <summary> /// Constructs a new instance of the host class based on the <paramref name="hostCmdProxy"/> /// (from Interop) and a reference to the current <paramref name="plugin"/>. /// </summary> /// <param name="hostCmdProxy">Must not be null.</param> /// <param name="plugin">Must not be null.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="hostCmdProxy"/> or /// <paramref name="plugin"/> is not set to an instance of an object.</exception> public VstHost(IVstHostCommandProxy hostCmdProxy, IVstPlugin plugin) { Throw.IfArgumentIsNull(hostCmdProxy, nameof(hostCmdProxy)); Throw.IfArgumentIsNull(plugin, nameof(plugin)); HostCommandProxy = hostCmdProxy; Plugin = plugin; _automation = new VstHostAutomation(this); _sequencer = new VstHostSequencer(this); _shell = new VstHostShell(this); _midiProcessor = new VstHostMidiProcessor(this); }