BASS_ASIO_ChannelReset

Resets the attributes of a channel (or all channels).

BOOL BASS_ASIO_ChannelReset(
    BOOL input,
    int channel,
    DWORD flags
);

Parameters

inputDealing with an input channel? FALSE = an output channel.
channelThe input/output channel number... 0 = first, -1 = all channels.
flagsThe attributes to reset. A combination of the following.
BASS_ASIO_RESET_ENABLEDisable the channel. This includes mirror channels.
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

If successful, then TRUE is returned, else FALSE is returned. Use BASS_ASIO_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_INITBASS_ASIO_Init has not been successfully called.
BASS_ERROR_ILLPARAMThe input and channel combination is invalid.

Remarks

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

Example

Disable all output channels and remove all joins between them.
BASS_ASIO_ChannelReset(FALSE, -1, BASS_ASIO_RESET_ENABLE | BASS_ASIO_RESET_JOIN);

See also

BASS_ASIO_ChannelEnable, BASS_ASIO_ChannelEnableBASS, BASS_ASIO_ChannelEnableMirror, BASS_ASIO_ChannelJoin, BASS_ASIO_ChannelPause, BASS_ASIO_ChannelSetFormat, BASS_ASIO_ChannelSetRate, BASS_ASIO_ChannelSetVolume