BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiHandler Constructor (Int32, Boolean, Boolean, Int32, Int32, Single, Single)BASS.NET API for the Un4seen BASS Audio Library
Creates an instance of the WASAPI handler.

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

public BassWasapiHandler(
	int device,
	bool exclusive,
	bool eventSystem,
	int freq,
	int chans,
	float buffer,
	float period
)

Parameters

device
Type: SystemInt32
The device to use... 0 = first device.
exclusive
Type: SystemBoolean
Use the WASAPI device in exclusive mode?
eventSystem
Type: SystemBoolean
Use the event-driven system?
freq
Type: SystemInt32
The sample rate to use (only used in exclusive mode, in shared mode the default mixer sample rate is used).
chans
Type: SystemInt32
The number of channels to use (only used in exclusive mode, in shared mode the default mixer number of channels are used).
buffer
Type: SystemSingle
The buffer size (in seconds) to use (set to 0 to use the default buffer length).
period
Type: SystemSingle
The update period (in seconds) to use (set to 0 to use the default update period).
Exceptions

ExceptionCondition
ArgumentExceptionInvalid device: the Wasapi device is invalid.
NotSupportedExceptionInternal Mixer: the internal mixer cannot be created (e.g. BASS_Init(Int32, Int32, BASSInit, IntPtr) was never called).
Remarks

The instance automatically detects according to the device being used, if this handler will be dealing with as input (capture or loopback) or with output (rendering) endpoint device. You might use the IsInput property to validate this.

Exclusive Mode: The requested number of channels are used. The requested sample rate is used.

Shared Mode: The default mixer number of channels are used. The default mixer sample rate is used (the freq parameter is ignored).

Session volume limits the effect of DeviceVolume and DeviceMute to the current process; other users of the device are unaffected. Session volume has no effect on exclusive mode output, and maps to the device volume with input devices (so does affect other users).

If the event-driven system is used, the (the buffer and period parameters are ignored in shared-mode).

See Also

Reference