BASS.NET API for the Un4seen BASS Audio LibraryBassEncBASS_Encode_SetChannel Method BASS.NET API for the Un4seen BASS Audio Library
Moves an encoder (or all encoders on a channel) to another channel.

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

public static bool BASS_Encode_SetChannel(
	int handle,
	int channel


Type: SystemInt32
The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
Type: SystemInt32
The channel to move the encoder(s) to... a HSTREAM, HMUSIC, or HRECORD.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.

The new channel must have the same sample format (rate, channels, resolution) as the old channel, as that is what the encoder is expecting. A channel's sample format is available via BASS_ChannelGetInfo(Int32, BASS_CHANNELINFO).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle or channel is not valid.
BASS_ERROR_FORMATThe new channel's sample format is not the same as the old channel's.

See Also