BASS.NET API for the Un4seen BASS Audio LibraryBassSfxBASS_SFX_PluginGetType Method BASS.NET API for the Un4seen BASS Audio Library
Get the type of visual plugin loaded.

Namespace: Un4seen.Bass.AddOn.Sfx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[DllImportAttribute("bass_sfx.dll", CharSet = CharSet.Auto)]
public static BASSSFXPlugin BASS_SFX_PluginGetType(
	int handle
)

Parameters

handle
Type: SystemInt32
The SFX plugin handle (as obtained by BASS_SFX_PluginCreate(String, IntPtr, Int32, Int32, BASSSFXFlag)).

Return Value

Type: BASSSFXPlugin
If successful, either BASS_SFX_SONIQUE, BASS_SFX_WINAMP, BASS_SFX_WMP or BASS_SFX_BBP is returned, else BASS_SFX_UNKNOWN is returned.
Remarks

You must have created a plugin object using BASS_SFX_PluginCreate(String, IntPtr, Int32, Int32, BASSSFXFlag) before you can use this function.

ERROR CODEDescription
BASS_SFX_ERROR_INITBASS_SFX_Init(IntPtr, IntPtr) has not been successfully called.
BASS_SFX_ERROR_HANDLEInvalid SFX handle.
BASS_SFX_ERROR_UNKNOWNSome other mystery problem!

Examples

VB
If BassSfx.BASS_SFX_PluginGetType(sfx) = BASSSFXPlugin.BASS_SFX_WINAMP Then 
    ' a winamp visual plugin was loaded 
ElseIf BassSfx.BASS_SFX_PluginGetType(sfx) = BASSSFXPlugin.BASS_SFX_SONIQUE Then 
    ' a sonique visual plugin was loaded 
ElseIf BassSfx.BASS_SFX_PluginGetType(sfx) = BASSSFXPlugin.BASS_SFX_WMP Then 
    ' a WMP visual plugin was loaded 
ElseIf BassSfx.BASS_SFX_PluginGetType(sfx) = BASSSFXPlugin.BASS_SFX_BBP Then 
    ' a BassBox visual plugin was loaded 
Else 
    ' we have either loaded nothing or an unsupported plugin 
End If
if (BassSfx.BASS_SFX_PluginGetType(sfx) == BASSSFXPlugin.BASS_SFX_WINAMP)
{
    // a winamp visual plugin was loaded
}
else if (BassSfx.BASS_SFX_PluginGetType(sfx) == BASSSFXPlugin.BASS_SFX_SONIQUE)
{
    // a sonique visual plugin was loaded
}
else if (BassSfx.BASS_SFX_PluginGetType(sfx) == BASSSFXPlugin.BASS_SFX_WMP)
{
    // a WMP visual plugin was loaded
}
else if (BassSfx.BASS_SFX_PluginGetType(sfx) == BASSSFXPlugin.BASS_SFX_BBP)
{
    // a BassBox visual plugin was loaded
}
else
{
    // we have either loaded nothing or an unsupported plugin
}
See Also

Reference