Creates a plugin object for use in the SFX.
Namespace: Un4seen.Bass.AddOn.Sfx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bass_sfx", EntryPoint = "BASS_SFX_PluginCreateW")] public static int BASS_SFX_PluginCreate( string file, IntPtr hWnd, int width, int height, BASSSFXFlag flags )
Parameters
- file
- Type: SystemString
The filename and path of the plugin to load. - hWnd
- Type: SystemIntPtr
The handle of the window where the plugin is to be rendered. - width
- Type: SystemInt32
The initial width for the plugins rendering window. - height
- Type: SystemInt32
The initial height for the plugins rendering window. - flags
- Type: Un4seen.Bass.AddOn.SfxBASSSFXFlag
Any combination of these flags (see BASSSFXFlag):BASS_SFX_SONIQUE_OPENGL Render sonique plugins using OpenGL. BASS_SFX_SONIQUE_OPENGL_DOUBLEBUFFER Use OpenGL double buffering with sonique plugins.
Return Value
Type: Int32If successful, the new SFX plugin handle is returned, else 0 is returned.
Remarks
Mainly you might use the BASS_SFX_PluginStart(Int32), BASS_SFX_PluginSetStream(Int32, Int32) or BASS_SFX_PluginRender(Int32, Int32, IntPtr) methods.
Note: This method uses the unicode overload of the native API (BASS_SFX_PluginCreateW).
ERROR CODE | Description |
---|---|
BASS_SFX_ERROR_INIT | BASS_SFX_Init(IntPtr, IntPtr) has not been successfully called. |
BASS_SFX_ERROR_FILEOPEN | Can't open the plugin file. |
BASS_SFX_ERROR_FORMAT | Unsupported plugin format. |
BASS_SFX_ERROR_GUID | Can't open WMP plugin using specified GUID. |
BASS_SFX_ERROR_MEM | There is insufficient memory. |
BASS_SFX_ERROR_UNKNOWN | Some other mystery problem! |
Examples
// create a plugin object int sfx = BassSfx.BASS_SFX_PluginCreate("corona.svp", pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height, BASSSFXFlag.BASS_SFX_DEFAULT); if (sfx != 0) { // loaded file successfully BASS_SFX_PluginStart(sfx); }
See Also