Beispiel #1
0
        public static Version BASS_WADSP_GetVersion(int fieldcount)
        {
            if (fieldcount < 1)
            {
                fieldcount = 1;
            }
            if (fieldcount > 4)
            {
                fieldcount = 4;
            }
            int     num    = BassWaDsp.BASS_WADSP_GetVersion();
            Version result = new Version(2, 4);

            switch (fieldcount)
            {
            case 1:
                result = new Version(num >> 24 & 255, 0);
                break;

            case 2:
                result = new Version(num >> 24 & 255, num >> 16 & 255);
                break;

            case 3:
                result = new Version(num >> 24 & 255, num >> 16 & 255, num >> 8 & 255);
                break;

            case 4:
                result = new Version(num >> 24 & 255, num >> 16 & 255, num >> 8 & 255, num & 255);
                break;
            }
            return(result);
        }
Beispiel #2
0
 public bool Load()
 {
     if (this.IsLoaded)
     {
         BassWaDsp.BASS_WADSP_FreeDSP(this._plugin);
     }
     this._plugin = BassWaDsp.BASS_WADSP_Load(this._file, 5, 5, 100, 100, null);
     return(this._plugin != 0);
 }
Beispiel #3
0
        public static string BASS_WADSP_PluginInfoGetModuleName(int module)
        {
            IntPtr intPtr = BassWaDsp.BASS_WADSP_PluginInfoGetModuleNamePtr(module);

            if (intPtr != IntPtr.Zero)
            {
                return(Utils.IntPtrAsStringAnsi(intPtr));
            }
            return(null);
        }
Beispiel #4
0
        public static string BASS_WADSP_GetName(int plugin)
        {
            IntPtr intPtr = BassWaDsp.BASS_WADSP_GetNamePtr(plugin);

            if (intPtr != IntPtr.Zero)
            {
                return(Utils.IntPtrAsStringAnsi(intPtr));
            }
            return(null);
        }
Beispiel #5
0
 public WINAMP_DSP(string fileName)
 {
     this._file = fileName;
     if (BassWaDsp.BASS_WADSP_PluginInfoLoad(this._file))
     {
         this._description = BassWaDsp.BASS_WADSP_PluginInfoGetName();
         this._modulecount = BassWaDsp.BASS_WADSP_PluginInfoGetModuleCount();
         this._modulenames = BassWaDsp.BASS_WADSP_PluginInfoGetModuleNames();
         BassWaDsp.BASS_WADSP_PluginInfoFree();
     }
 }
Beispiel #6
0
 public bool Unload()
 {
     if (this.IsStarted)
     {
         this.Stop();
     }
     if (this.IsLoaded)
     {
         BassWaDsp.BASS_WADSP_FreeDSP(this._plugin);
         this._plugin = 0;
         return(true);
     }
     return(false);
 }
Beispiel #7
0
 public int Start(int module, int channel, int prio)
 {
     if (this.IsLoaded && module >= 0 && module < this._modulecount && channel != 0)
     {
         if (this.IsStarted)
         {
             this.Stop();
         }
         this._dsp    = 0;
         this._module = -1;
         BassWaDsp.BASS_WADSP_Start(this._plugin, module, channel);
         this._module = module;
         this._dsp    = BassWaDsp.BASS_WADSP_ChannelSetDSP(this._plugin, channel, prio);
         return(this._dsp);
     }
     return(0);
 }
Beispiel #8
0
 public bool Stop()
 {
     if (!this.IsLoaded)
     {
         return(false);
     }
     if (this.IsStarted && !BassWaDsp.BASS_WADSP_ChannelRemoveDSP(this._plugin))
     {
         return(false);
     }
     if (BassWaDsp.BASS_WADSP_Stop(this._plugin))
     {
         this._dsp    = 0;
         this._module = -1;
         return(true);
     }
     return(false);
 }
Beispiel #9
0
        public static string[] BASS_WADSP_PluginInfoGetModuleNames()
        {
            List <string> list = new List <string>();
            int           num  = 0;
            string        text = string.Empty;

            while (text != null)
            {
                text = BassWaDsp.BASS_WADSP_PluginInfoGetModuleName(num);
                num++;
                if (text != null)
                {
                    list.Add(text);
                }
            }
            Bass.BASS_GetCPU();
            return(list.ToArray());
        }
Beispiel #10
0
 public bool ShowEditor()
 {
     return(this.IsLoaded && this._module >= 0 && BassWaDsp.BASS_WADSP_Config(this._plugin));
 }
Beispiel #11
0
 public bool SetFilename(string filename)
 {
     return(this.IsLoaded && this.IsStarted && BassWaDsp.BASS_WADSP_SetFileName(this._plugin, filename));
 }
Beispiel #12
0
 public bool SetSongTitle(string title)
 {
     return(this.IsLoaded && this.IsStarted && BassWaDsp.BASS_WADSP_SetSongTitle(this._plugin, title));
 }