BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiHandlerSetFullDuplex Method BASS.NET API for the Un4seen BASS Audio Library
Sets the full-duplex option for WASAPI input using the given BASS output device.

Namespace: Un4seen.BassWasapi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public bool SetFullDuplex(
	int bassDevice,
	BASSFlag flags,
	bool buffered
)

Parameters

bassDevice
Type: SystemInt32
The BASS output device which should be used for full-duplex monitoring.
flags
Type: Un4seen.BassBASSFlag
The optional BASSFlag flags to be used to create the full-duplex monitoring OutputChannel. Typically only the following flags should be used: BASS_STREAM_DECODE, BASS_SAMPLE_SOFTWARE or BASS_SPEAKER_xxx.
buffered
Type: SystemBoolean
, if the OutputChannel should be (pre)buffered - else .

Prebuffering of sample data is often requied for buffered output to enable a constant playback. So even if you are using a BASS_STREAM_DECODE flag you might need to prebuffer it's data.

Return Value

Type: Boolean
On success is returned, else will be returned (use BASS_ErrorGetCode to retrieve the error code).
Remarks

The following will be done internally:

1. The BASS output bassDevice will be used.

2. A custom push stream (see OutputChannel) will be created (using the given flags) with an internal WASAPI callback feeding the stream with the sample data from the input.

3. The samplerate, format and number of channels will not be changed for WASAPI input, since this will be used as already specified in the constructor.

4. The custom push stream will be started playing (via BASS_ChannelPlay(Int32, Boolean)) - unless the BASS_STREAM_DECODE flag has been specified.

This method can not be used with WASAPI output (see IsInput). It will immediately return with no effect.

To disable and remove the full-duplex option call RemoveFullDuplex.

The full-duplex BASS output is provided by the internal custom push stream OutputChannel. You might use this stream to set up DSPs or FX on it so that these are applied on the BASS output.

You might use the 0 (no-sound) bass device together with the BASS_STREAM_DECODE flag in order to create a custom decoding OutputChannel which might for example be used with an BaseEncoder or WaveWriter or as a source for a mixer channel.

See Also

Reference