/// <summary> /// 设置DSP插件,显示DSP插件界面 /// </summary> public void ConfigDSP() { if (dspHandle >= 0 && dspModule >= 0) { BassWaDsp.BASS_WADSP_Config(dspHandle); } }
/// <summary> /// Shows the WinAmp DSP plug-in configuration screen /// </summary> /// <param name="plugin">The WinAmp DSP plug-in.</param> public static void ShowWaPluginConfig(WaPlugin plugin) { if (plugin == null) { return; } BassWaDsp.BASS_WADSP_Config(plugin.Id); }
/// <summary> /// Open VST Plugin Configuration window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ShowConfigWindow() { DSPPluginInfo pluginInfo = (DSPPluginInfo)listBoxSelectedPlugins.SelectedItem; if (pluginInfo == null) { return; } if (pluginInfo.DSPPluginType == DSPPluginInfo.PluginType.VST) { _vstHandle = _vstHandles[pluginInfo.Name]; BASS_VST_INFO vstInfo = new BASS_VST_INFO(); if (BassVst.BASS_VST_GetInfo(_vstHandle, vstInfo) && vstInfo.hasEditor) { // Set a handle to the callback procedure _vstProc = new VSTPROC(vstEditorCallBack); BassVst.BASS_VST_SetCallback(_vstHandle, _vstProc, IntPtr.Zero); // create a new System.Windows.Forms.Form Form f = new MPConfigForm(); f.Width = vstInfo.editorWidth + 4; f.Height = vstInfo.editorHeight + 34; f.Closing += new CancelEventHandler(f_Closing); f.Text = vstInfo.effectName; BassVst.BASS_VST_EmbedEditor(_vstHandle, f.Handle); f.ShowDialog(); } else { MessageBox.Show("Plugin has no Configuration"); } } else { _waDspPlugin = _waDspPlugins[pluginInfo.FilePath]; BassWaDsp.BASS_WADSP_Start(_waDspPlugin, 0, 0); BassWaDsp.BASS_WADSP_Config(_waDspPlugin); } }
public void Evaluate(int SpreadMax) { bool reset = false; #region Reset is handle or fconnected change if (FConnected != this.FPinInHandle.IsConnected) { if (this.FPinInHandle.IsConnected) { reset = true; } else { this.ClearUp(); } this.FConnected = this.FPinInHandle.IsConnected; } #endregion #region Reset if (this.FPinInHandle.PinIsChanged || reset || this.FPinInEnabled.PinIsChanged || this.FPinInFilename.PinIsChanged) { this.ClearUp(); if (this.FPinInHandle.IsConnected) { if (this.FPinInFilename.SliceCount > 0) { this.FPinInFilename.GetString(0, out this.FFilename); this.FFilename = this.FFilename == null ? "" : this.FFilename; //Just Update the Handle double dhandle; this.FPinInHandle.GetValue(0, out dhandle); int ihandle = Convert.ToInt32(Math.Round(dhandle)); if (File.Exists(this.FFilename) && this.FManager.Exists(ihandle)) { this.FChannel = this.FManager.GetChannel(ihandle); this.FChannel.OnInit += new EventHandler(FChannel_OnInit); if (this.FChannel.BassHandle.HasValue) { this.AddDSP(); } } else { this.FChannel = null; this.FDSPHandle = 0; } } } } #endregion double dshow; this.FPinInShowConfig.GetValue(0, out dshow); if (this.FDSPHandle != 0 && dshow >= 0.5) { BassWaDsp.BASS_WADSP_Config(this.FDSPHandle, 0); } }