private void StopPlugin(VstPlugin plugin) { if (plugin.State == PluginState.Activated) { plugin.Deactivate(); } if (plugin.State == PluginState.Deactivated) { plugin.Unload(); } }
private void cbEffectNames_SelectedIndexChanged(object sender, EventArgs e) { if (mIgnoreEvents) { return; } if (mVstPlugin.State != PluginState.Empty) { mVstPlugin.Unload(); } if (cbEffectNames.SelectedItem.ToString() != "None") { string effectName = cbEffectNames.SelectedItem.ToString(); mVstPlugin.AttachVstPluginContext(mAudioPluginEngine.CreateVstPluginContext(effectName), effectName); btnEdit.Enabled = true; } cbEnabled.Enabled = cbEffectNames.SelectedIndex != 0; }