BASS.NET API for the Un4seen BASS Audio Library

BassAsioBASS_ASIO_ChannelReset Method

BASS.NET API for the Un4seen BASS Audio Library
Resets the attributes of a channel (or all channels).

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

[DllImportAttribute("bassasio")]
public static bool BASS_ASIO_ChannelReset(
	bool input,
	int channel,
	BASSASIOReset flags
)

Parameters

input
Type: SystemBoolean
Dealing with an input channel? = an output channel.
channel
Type: SystemInt32
The input/output channel number... 0 = first, -1 = all channels.
flags
Type: Un4seen.BassAsioBASSASIOReset
The attributes to reset. A combination of the following (see BASSASIOReset):
BASS_ASIO_RESET_ENABLEDisable the channel.
BASS_ASIO_RESET_JOINUnjoin the channel.
BASS_ASIO_RESET_PAUSEUnpause the channel.
BASS_ASIO_RESET_FORMATSet the channel's sample format to the native format.
BASS_ASIO_RESET_RATESet the channel's sample rate to the device rate.
BASS_ASIO_RESET_VOLUMESet the channel's volume to normal (1.0).
BASS_ASIO_RESET_JOINEDAlso reset any channels that are joined to the specified channel. This can be used in combination with BASS_ASIO_RESET_JOIN to unjoin all channels from the specified one.

Return Value

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

When resetting all channels (channel = -1), the resetting only applies to all channels of the specified type, ie. input or output, not both.

ERROR CODEDescription
BASS_ERROR_INITBASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called.
BASS_ERROR_ILLPARAMThe input and channel combination is invalid, or flags is.
BASS_ERROR_STARTThe device has been started - it needs to be stopped before disabling or unjoining channels.

Examples

Disable all output channels and remove all joins between them:
BassAsio.BASS_ASIO_ChannelReset(false, -1, BASSASIOReset.BASS_ASIO_RESET_ENABLE | BASSASIOReset.BASS_ASIO_RESET_JOIN);
See Also

Reference