BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiBASS_WASAPI_GetDevice Method BASS.NET API for the Un4seen BASS Audio Library
Retrieves the Wasapi device setting in the current thread.

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

[DllImportAttribute("basswasapi.dll", CharSet = CharSet.Auto)]
public static int BASS_WASAPI_GetDevice()

Return Value

Type: Int32
If successful, the device number is returned, else -1 is returned. Use BASS_ErrorGetCodeto get the error code.
Remarks

As in BASS, simultaneously using multiple devices is supported in the BASSWASAPI API via a context switching system - instead of there being an extra "device" parameter in the function calls, the device to be used needs to be set via BASS_WASAPI_SetDevice(Int32) prior to calling the function. The device setting is local to the current thread, so calling functions with different devices simultaneously in multiple threads is not a problem.

ERROR CODEDescription
BASS_ERROR_INITBASS_WASAPI_Init(Int32, Int32, Int32, BASSWASAPIInit, Single, Single, WASAPIPROC, IntPtr) has not been successfully called - there are no initialized devices.

See Also

Reference