BASS.NET API for the Un4seen BASS Audio Library

BassAsioBASS_ASIO_ChannelPause Method

BASS.NET API for the Un4seen BASS Audio Library
Suspends processing 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_ChannelPause(
	bool input,
	int channel
)

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.

Return Value

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

Channels can only be disabled when the device is stopped. When you want to stop processing only some of the enabled channels, there are few ways that could be done. You could quickly stop the device, disable the unwanted channels, and restart the device. In the case of output channels, you could fill the channels' buffers with silence (0s) in the ASIOPROC. Or you could pause the channels, using this function. The less channels BASSASIO has to process, the less CPU it'll use, so stopping and restarting the device would be the most efficient, but that could cause a slight break in the sound of the other channels. Filling the buffers with silence is the least efficient, as BASSASIO will still process the data as if it was "normal", but it does mean that other channels are unaffected. Pausing is a compromise between the two - the channels will still be enabled, but BASSASIO will bypass any additional processing (resampling/etc) that may normally be required.

Use BASS_ASIO_ChannelReset(Boolean, Int32, BASSASIOReset) to resume processing of a paused channel.

When pausing all channels (channel = -1), it 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.

See Also

Reference