public FileSelectorScope(IVstHostCommands20 commands, VstFileSelect fileSelect) { _commands = commands; _fileSelect = fileSelect; if (!_commands.OpenFileSelector(_fileSelect)) { throw new InvalidOperationException( Properties.Resources.FileSelectorScope_OpenNotSupported); } }
/// <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; _commands = hostCmdProxy.Commands; Plugin = plugin; _automation = new VstHostAutomation(_commands); _sequencer = new VstHostSequencer(_commands); _shell = new VstHostShell(this); _midiProcessor = new VstHostMidiProcessor(_commands); }
public AudioGenerator(IVstHostCommands20 host, VstPluginContext plugin) { _plugin = plugin; WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat((int)(0.5 + 1000 * host.GetSampleRate()), 2); }
/// <summary> /// Constructs a new instance based on a <paramref name="commands"/> object. /// </summary> /// <param name="commands">Must not be null.</param> /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="commands"/> is not set to an instance of an object.</exception> public VstHostSequencer(IVstHostCommands20 commands) { _commands = commands ?? throw new ArgumentNullException(nameof(commands)); }
public EditParameterScope(IVstHostCommands20 commands, int index) { _commands = commands ?? throw new ArgumentNullException(nameof(commands)); _index = index; }
/// <summary> /// Constructs an instance on the host proxy. /// </summary> /// <param name="commands">Must not be null.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="commands"/> is not set to an instance of an object.</exception> public VstHostAutomation(IVstHostCommands20 commands) { _commands = commands ?? throw new ArgumentNullException(nameof(commands)); }
/// <summary> /// Constructs an instance on the host proxy. /// </summary> /// <param name="host">Must not be null.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="host"/> is not set to an instance of an object.</exception> public VstHostShell(VstHost host) { _host = host ?? throw new ArgumentNullException(nameof(host)); _commands = host.HostCommandProxy.Commands; }
/// <summary> /// Constructs an instance on the host proxy. /// </summary> /// <param name="commands">Must not be null.</param> /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="commands"/> is not set to an instance of an object.</exception> public VstHostMidiProcessor(IVstHostCommands20 commands) { _commands = commands ?? throw new ArgumentNullException(nameof(commands)); }
public void SetHost(IVstHostCommands20 hostAutomation) { HostAutomation = hostAutomation; }