Join a channel to another.
BOOL BASS_ASIO_ChannelJoin( BOOL input, DWORD channel, int channel2 );
|input||Dealing with input channels? FALSE = output channels.|
|channel||The input/output channel number... 0 = first.|
|channel2||The channel to join it to... -1 = remove current join.|
|BASS_ERROR_INIT||BASS_ASIO_Init has not been successfully called.|
|BASS_ERROR_START||The device has been started and at least one of the channels is not currently enabled. The device needs to be stopped before enabling channels.|
|BASS_ERROR_ILLPARAM||At least one of the channels is invalid.|
|BASS_ERROR_FORMAT||It is not possible to join channels that do not have the same sample format.|
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 call to remove that restriction. When joining a group of channels, there should be one channel enabled via BASS_ASIO_ChannelEnable 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, 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 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.
BASS_ASIO_ChannelEnable(FALSE, 0, MyAsioProc, 0); // enable processing of output channel 0 BASS_ASIO_ChannelJoin(FALSE, 1, 0); // join channel 1 to it