BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiBASS_WASAPI_GetDeviceInfo Method (Int32, BASS_WASAPI_DEVICEINFO)BASS.NET API for the Un4seen BASS Audio Library
Retrieves information on a Wasapi device (endpoint).

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

public static bool BASS_WASAPI_GetDeviceInfo(
	int device,
	BASS_WASAPI_DEVICEINFO info
)

Parameters

device
Type: SystemInt32
The device to get the information of... 0 = first.
info
Type: Un4seen.BassWasapiBASS_WASAPI_DEVICEINFO
An instance of the BASS_WASAPI_DEVICEINFO class to store the information at.

Return Value

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

This function can be used to enumerate the available Wasapi devices (endpoints) for a setup dialog.

Note: Input (capture) devices can be determined by evaluating the flags member (which must be either BASS_DEVICE_INPUT or BASS_DEVICE_LOOPBACK).

ERROR CODEDescription
BASS_ERROR_WASAPIWASAPI is not available.
BASS_ERROR_DEVICEThe device number specified is invalid.

Examples

List all available endpoints:
VB
Dim n As Integer = 0
Dim info As New BASS_WASAPI_DEVICEINFO()
While (BassWasapi.BASS_WASAPI_GetDeviceInfo(n, info))
  Console.WriteLine(info.ToString())
  n += 1
End While
BASS_WASAPI_DEVICEINFO info = new BASS_WASAPI_DEVICEINFO();
for (int n=0; BassWasapi.BASS_WASAPI_GetDeviceInfo(n, info); n++)
{
  Console.WriteLine(info.ToString());
}
Or use the BASS_WASAPI_GetDeviceInfos method for more convenience.
See Also

Reference