BASS.NET API for the Un4seen BASS Audio LibraryBassSfxBASS_SFX_PluginSetStream Method BASS.NET API for the Un4seen BASS Audio Library
Sets a BASS channel on a SFX plugin.

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 bool BASS_SFX_PluginSetStream(
	int handle,
	int channel
)

Parameters

handle
Type: SystemInt32
The SFX plugin handle (as obtained by BASS_SFX_PluginCreate(String, IntPtr, Int32, Int32, BASSSFXFlag)).
channel
Type: SystemInt32
The BASS channel to render, can be a HSTREAM or HMUSIC handle.

Return Value

Type: Boolean
If successful, then is returned, else is returned.
Remarks

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

Examples

VB
' create a BASS channel
Dim stream As Integer = Bass.BASS_StreamCreateFile("test.mp3", 0L, 0L, BASSFlag.BASS_DEFAULT);
' create a plugin object
Dim sfx As Integer = BassSfx.BASS_SFX_PluginCreate("corona.svp", pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height, BASSSFXFlag.BASS_SFX_DEFAULT)
If sfx <> 0 AndAlso stream <> 0 Then 
    ' loaded file successfully
    If BASS_SFX_PluginStart(sfx) Then 
        BASS_SFX_PluginSetStream(sfx, stream) 
    End If 
End If
// create a BASS channel
int stream = Bass.BASS_StreamCreateFile("test.mp3", 0L, 0L, BASSFlag.BASS_DEFAULT);
// create a plugin object
int sfx = BASS_SFX_PluginCreate("corona.svp", pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height, BASSSFXFlag.BASS_SFX_DEFAULT);
if (sfx != 0 && stream != 0)
{
    // loaded file successfully
    if (BASS_SFX_PluginStart(sfx))
        BASS_SFX_PluginSetStream(sfx, stream);
}
See Also

Reference