Assembly: Bass.Net (in Bass.Net.dll) Version: 220.127.116.11
[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)] public static bool BASS_ChannelSetLink( int handle, int chan )
<DllImportAttribute("bass.dll", CharSet := CharSet.Unicode>] Public Shared Function BASS_ChannelSetLink ( handle As Integer, chan As Integer ) As Boolean
public: [DllImportAttribute(L"bass.dll", CharSet = CharSet::Unicode)] static bool BASS_ChannelSetLink( int handle, int chan )
[<DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)>] static member BASS_ChannelSetLink : handle : int * chan : int -> bool
- Type: SystemInt32
The channel handle... a HMUSIC or HSTREAM.
- Type: SystemInt32
The handle of the channel to have linked with it... a HMUSIC or HSTREAM.
Return ValueType: Boolean
If succesful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Linked channels are started/stopped/paused/resumed together. Links are one-way, for example, channel chan will be started by channel handle, but not vice versa unless another link has been set in that direction.
If a linked channel has reached the end, it will not be restarted when a channel it is linked to is started. If you want a linked channel to be restarted, you need to have resetted it's position using BASS_ChannelSetPosition(Int32, Int64, BASSMode) beforehand.
|BASS_ERROR_HANDLE||At least one of handle and chan is not a valid channel.|
|BASS_ERROR_DECODE||At least one of handle and chan is a "decoding channel", so can't be linked.|
|BASS_ERROR_ALREADY||chan is already linked to handle.|
|BASS_ERROR_UNKNOWN||Some other mystery problem!|
Except for on Windows, linked channels on the same device are guaranteed to start playing simultaneously. On Windows, it is possible for there to be a slight gap between them, but it will generally be shorter (and never longer) than starting them individually.
' link stream2 to stream1 Bass.BASS_ChannelSetLink(stream1, stream2) ' start both streams together Bass.BASS_ChannelPlay(stream1, False)
// link stream2 to stream1 Bass.BASS_ChannelSetLink(stream1, stream2); // start both streams together Bass.BASS_ChannelPlay(stream1, false);