This overload implements the Unicode version for the file name.
Assembly: Bass.Net (in Bass.Net.dll) Version: 126.96.36.199
public static int BASS_PluginLoad( string file )
Public Shared Function BASS_PluginLoad ( file As String ) As Integer
- Type: SystemString
Filename of the add-on/plugin.
Return ValueType: Int32
If successful, the loaded plugin's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
There are 2 ways in which add-ons can provide support for additional formats. They can provide dedicated functions to create streams of the specific format(s) they support and/or they can plug into the standard stream creation functions: BASS_StreamCreateFile(String, Int64, Int64, BASSFlag), BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr), and BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr). This function enables the latter method. Both methods can be used side by side. The obvious advantage of the plugin system is convenience, while the dedicated functions can provide extra options that are not possible via the shared function interfaces. See an add-on's documentation for more specific details on it.
As well as the stream creation functions, plugins also add their additional format support to BASS_SampleLoad(String, Int64, Int32, Int32, BASSFlag).
Information on what file formats a plugin supports is available via the BASS_PluginGetInfo(Int32) function.
When using multiple plugins, the stream/sample creation functions will try each of them in the order that they were loaded via this function, until one that accepts the file is found. When an add-on is already loaded (eg. if you are using functions from it), the plugin system will use the same instance (the reference count will just be incremented); there will not be 2 copies of the add-on in memory.
Note: Only stream/music add-ons are loaded (e.g. bass_fx.dll or bassmix.dll are NOT loaded).
Dynamic libraries are not permitted on iOS, so add-ons are provided as static libraries instead, which means this function has to work a little differently. The add-on needs to be linked into the executable, and a "plugin" symbol declared and passed to this function (instead of a filename).
|BASS_ERROR_FILEOPEN||The file could not be opened.|
|BASS_ERROR_FILEFORM||The file is not a plugin.|
|BASS_ERROR_ALREADY||The file is already plugged in.|
' load the FLAC add-on Dim pluginFlac As Integer = Bass.BASS_PluginLoad("bassflac.dll") ... ' use the add-on Dim stream As Integer = Bass.BASS_StreamCreateFile("file.flac", 0, 0, BASSFlag.BASS_DEFAULT) ... ' un-load the FLAC add-on Bass.BASS_PluginFree(pluginFlac)
// load the FLAC add-on int pluginFlac = Bass.BASS_PluginLoad("bassflac.dll"); ... // use the add-on int stream = Bass.BASS_StreamCreateFile("file.flac", 0, 0, BASSFlag.BASS_DEFAULT); ... // un-load the FLAC add-on Bass.BASS_PluginFree(pluginFlac);