Assembly: Bass.Net (in Bass.Net.dll) Version: 220.127.116.11
[DllImportAttribute("basswasapi.dll", CharSet = CharSet.Auto)] public static bool BASS_WASAPI_SetDevice( int device )
<DllImportAttribute("basswasapi.dll", CharSet := CharSet.Auto>] Public Shared Function BASS_WASAPI_SetDevice ( device As Integer ) As Boolean
public: [DllImportAttribute(L"basswasapi.dll", CharSet = CharSet::Auto)] static bool BASS_WASAPI_SetDevice( int device )
[<DllImportAttribute("basswasapi.dll", CharSet = CharSet.Auto)>] static member BASS_WASAPI_SetDevice : device : int -> bool
- Type: SystemInt32
The device to use... 0 = first device.
Return ValueType: Boolean
If successful, then is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Simultaneously using multiple devices is supported in the BASS API via a context switching system; instead of there being an extra "device" parameter in the function calls, the device to be used is set prior to calling the functions. The device setting is local to the current thread, so calling functions with different devices simultaneously in multiple threads is not a problem.
All of the BASSWASAPI functions that do not have their own "device" parameter make use of this device selection. When one of them is called, BASSWASAPI will check the current thread's device setting, and if no device is selected (or the selected device is not initialized), BASSWASAPI will automatically select the lowest device that is initialized. This means that when using a single device, there is no need to use this function; BASSWASAPI will automatically use the device that is initialized. Even if you free the device, and initialize another, BASSWASAPI will automatically switch to the one that is initialized.
|BASS_ERROR_DEVICE||The device number specified is invalid.|
|BASS_ERROR_INIT||The device has not been initialized.|