BASS.NET API for the Un4seen BASS Audio LibraryBassAsioBASS_ASIO_ChannelJoin Method BASS.NET API for the Un4seen BASS Audio Library
Join a channel to another.

Namespace: Un4seen.BassAsio
Assembly: Bass.Net (in Bass.Net.dll) Version:

public static bool BASS_ASIO_ChannelJoin(
	bool input,
	int channel,
	int channel2


Type: SystemBoolean
Dealing with input channels? = output channels.
Type: SystemInt32
The input/output channel number... 0 = first.
Type: SystemInt32
The channel to join it to... -1 = remove current join.

Return Value

Type: Boolean
If succesful, then is returned, else is returned. Use BASS_ASIO_ErrorGetCode to get the error code.

All ASIO channels are mono. By joining them, stereo (and above) channels can be formed, making it simpler to process stereo (and above) sample data.

By default, channels can only be joined to preceding channels. For example, channel 1 can be joined to channel 0, but not vice versa. The BASS_ASIO_JOINORDER flag can be used in the BASS_ASIO_Init(Int32, BASSASIOInit) call to remove that restriction. When joining a group of channels, there should be one channel enabled via BASS_ASIO_ChannelEnable(Boolean, Int32, ASIOPROC, IntPtr) with the rest joined to it - do not join a channel to a channel that is itself joined to another channel. Mirror channels, setup using BASS_ASIO_ChannelEnableMirror(Int32, Boolean, Int32), cannot be joined with.

If a channel has two or more other channels joined to it, then the joined channels will default to being in numerically ascending order in the ASIOPROC callback function's sample data unless the BASS_ASIO_JOINORDER flag was used in the BASS_ASIO_Init(Int32, BASSASIOInit) call, in which case they will be in the order in which they were joined via this function. In the latter case, if this function is called on an already joined channel, the channel will be moved to the end of the joined group.

While a channel is joined to another, it automatically takes on the attributes of the other channel - the other channel's settings determine the sample format, the sample rate and whether it is enabled. The volume setting remains individual though, allowing balance control over the joined channels.

ERROR CODEDescription
BASS_ERROR_INITBASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called.
BASS_ERROR_STARTThe device has been started - it needs to be stopped before (dis)enabling channels.
BASS_ERROR_ILLPARAMThe input and channel combination is invalid.
BASS_ERROR_FORMATIt is not possible to join channels that do not have the same sample format.


' enable processing of output channel 0
BassAsio.BASS_ASIO_ChannelEnable(False, 0, _myAsioProc, 0)
' join channel 1 to it
BassAsio.BASS_ASIO_ChannelJoin(False, 1, 0)
// enable processing of output channel 0
BassAsio.BASS_ASIO_ChannelEnable(false, 0, _myAsioProc, 0);
// join channel 1 to it
BassAsio.BASS_ASIO_ChannelJoin(false, 1, 0);
See Also