Esempio n. 1
0
            public FileSelectorScope(IVstHostCommands20 commands, VstFileSelect fileSelect)
            {
                _commands   = commands;
                _fileSelect = fileSelect;

                if (!_commands.OpenFileSelector(_fileSelect))
                {
                    throw new InvalidOperationException(
                              Properties.Resources.FileSelectorScope_OpenNotSupported);
                }
            }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        public AudioGenerator(IVstHostCommands20 host, VstPluginContext plugin)
        {
            _plugin = plugin;

            WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat((int)(0.5 + 1000 * host.GetSampleRate()), 2);
        }
Esempio n. 4
0
 /// <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));
 }
Esempio n. 5
0
 public EditParameterScope(IVstHostCommands20 commands, int index)
 {
     _commands = commands ?? throw new ArgumentNullException(nameof(commands));
     _index    = index;
 }
Esempio n. 6
0
 /// <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));
 }
Esempio n. 7
0
 /// <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;
 }
Esempio n. 8
0
 /// <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));
 }
Esempio n. 9
0
 public void SetHost(IVstHostCommands20 hostAutomation)
 {
     HostAutomation = hostAutomation;
 }