Namespace: Un4seen.Bass.AddOn.WaDsp
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
[DllImportAttribute("bass_wadsp")] public static int BASS_WADSP_Load( string dspfile, int x, int y, int width, int height, WINAMPWINPROC proc )
Parameters
- dspfile
- Type: SystemString
The fully qualified path and name of the Winamp DSP library you want to load (e.g. "C:\\Program Files\\Winamp\\Plugins\\dsp_ss.dll"). Both Unicode as well as Ansi filenames are supported, whereas Unicode is tried first. - x
- Type: SystemInt32
The X-coordinate of the fake Winamp window to create. - y
- Type: SystemInt32
The Y-coordinate of the fake Winamp window to create. - width
- Type: SystemInt32
The width of the fake Winamp window to create. - height
- Type: SystemInt32
The height of the fake Winamp window to create. - proc
- Type: Un4seen.Bass.AddOn.WaDspWINAMPWINPROC
An optional WINAMPWINPROC which should be used instead of the internal window process message handler. Or , if you want BASS_WADSP to handle it by default.
Return Value
Type: Int32The handle of the loaded plugin, which is needed in all further method calls.
In most cases the internal Windows message process handler should be fine and sufficient - however, if you encounter problems you might implement your own.
Make sure to call BASS_WADSP_FreeDSP(Int32) when the Winamp DSP is not needed anymore and should be unloaded and removed from memory.
Winamp DSPs are designed to run only for one stream. So if you have multiple streams or multiple players in your application and you want to use the same Winamp DSP you need to create temporary copies of the library files (e.g. copy "dsp_ss.dll" to "dsp_ss2.dll", "dsp_ss3.dll" etc.). Then you should load each individual library copy with this function. This will enable you to load multiple instances of the same Winamp DSP. Each loaded instance can then be used for individual streams.
NOTE: Do not use this method while you have already loaded the same Winamp plugin, as this might result in any unexpected behavior, since some Winamp plugins might crash when they are loaded twice.
ERROR CODE | Description |
---|---|
BASS_ERROR_FILEOPEN | The dspfile can not be found or loaded. |
BASS_ERROR_FILEFORM | The dspfile doesn't seem to be a Winamp DSP library file. |
BASS_ERROR_UNKNOWN | Some other problem (the internal fake Winamp window could not be created). |
int dspPluginA = BassWaDsp.BASS_WADSP_Load("dsp_test.dll", 5, 5, 100, 100, null); if (dspPluginA != 0) { BassWaDsp.BASS_WADSP_Start(dspPluginA, 0, 0); }