BASS.NET API for the Un4seen BASS Audio Library

BassWasapiBASS_WASAPI_Lock Method

BASS.NET API for the Un4seen BASS Audio Library
Locks the device to the current thread.

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

[DllImportAttribute("basswasapi")]
public static float BASS_WASAPI_Lock(
	bool state
)

Parameters

state
Type: SystemBoolean
If , unlock WASAPI, else lock it.

Return Value

Type: Single
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Locking a device prevents other threads from accessing the device buffer, including a WASAPIPROC. Other threads wanting to access a locked device will block until it is unlocked, so a device should only be locked very briefly. A device must be unlocked in the same thread that it was locked.
See Also

Reference