Пример #1
0
        /// <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);
        }
Пример #2
0
        public void ClearWaPlugin()
        {
            if (WaPlugin == null)
                return;

            DebugHelper.WriteLine("Unload plug-in" + WaPlugin.Name);
            try
            {
                BassWaDsp.BASS_WADSP_Stop(WaPlugin.Id);
                BassWaDsp.BASS_WADSP_ChannelRemoveDSP(WaPlugin.Id);
                BassWaDsp.BASS_WADSP_FreeDSP(WaPlugin.Id);
            }
            catch
            {
                // ignored
            }

            WaPlugin = null;
        }
Пример #3
0
        /// <summary>
        ///     Loads a WinAmp DSP plug-in and applies it to the mixer
        /// </summary>
        /// <param name="location">The file location of the WinAmp DSP DLL</param>
        public WaPlugin LoadWaPlugin(string location)
        {
            if (location == "") return null;

            if (WaPlugin != null && WaPlugin.Location == location) return WaPlugin;

            if (!File.Exists(location)) return null;

            BassMix.BASS_Mixer_ChannelPause(ChannelId);

            if (!_waDspLoaded) StartWaDspEngine();

            DebugHelper.WriteLine("Load WAPlugin " + location);

            var plugin = new WaPlugin
            {
                Id = BassWaDsp.BASS_WADSP_Load(location, 10, 10, 300, 300, null),
                Module = 0
            };

            plugin.Name = BassWaDsp.BASS_WADSP_GetName(plugin.Id);
            plugin.Location = location;
            BassWaDsp.BASS_WADSP_Start(plugin.Id, plugin.Module, ChannelId);
            BassWaDsp.BASS_WADSP_ChannelSetDSP(plugin.Id, ChannelId, 1);

            WaPlugin = plugin;

            BassMix.BASS_Mixer_ChannelPlay(ChannelId);

            return plugin;
        }
Пример #4
0
        /// <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);
        }