BASS_ASIO_ChannelEnable

Enables/disables processing of a channel.

BOOL BASS_ASIO_ChannelEnable(
    BOOL input,
    DWORD channel,
    ASIOPROC *proc,
    void *user
);

Parameters

inputDealing with an input channel? FALSE = an output channel.
channelThe input/output channel number... 0 = first.
procThe user defined function to process the channel... NULL = disable the channel.
userUser instance data to pass to the callback function.

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_STARTThe device needs to be stopped before the channel can be enabled.
BASS_ERROR_ILLPARAMThe input and channel combination is invalid.

Remarks

All ASIO channels are mono. Stereo (and above) channels can be formed by joining multiple channels together using BASS_ASIO_ChannelJoin.

Use BASS_ASIO_Start to begin processing the enabled channels. An enabled channel's proc and user parameters can be changed after the device has been started, but other channels cannot be enabled without stopping the device first.

BASS channels can be used directly, without needing an ASIOPROC callback function, via BASS_ASIO_ChannelEnableBASS.

Example

Enable output channel 0.
BASS_ASIO_ChannelEnable(FALSE, 0, MyAsioProc, 0);

See also

BASS_ASIO_ChannelEnableBASS, BASS_ASIO_ChannelEnableMirror, BASS_ASIO_ChannelIsActive, BASS_ASIO_ChannelJoin, BASS_ASIO_ChannelReset, BASS_ASIO_ChannelSetVolume, BASS_ASIO_Start, ASIOPROC callback