BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiBASS_WASAPI_GetDeviceLevel Method BASS.NET API for the Un4seen BASS Audio Library
Gets the audio meter information of the current Wasapi device/driver (endpoint).

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

[DllImportAttribute("basswasapi.dll", CharSet = CharSet.Auto)]
public static float BASS_WASAPI_GetDeviceLevel(
	int device,
	int chan
)

Parameters

device
Type: SystemInt32
The device to use... 0 = first device. BASS_WASAPI_GetDeviceInfo(Int32, BASS_WASAPI_DEVICEINFO) can be used to get the total number of devices.
chan
Type: SystemInt32
The channel number to get the audio level meter information from (0=first, -1=all).

Return Value

Type: Single
The audio level between 0.0 (silence) and 1.0 (maximum).
Remarks

This method returns the global session level for the device which might include the level of other applications using the same device in shared-mode.

This function gets the level from the device/driver, or WASAPI if the device does not have its own level meter. If the latter case, the level will be unavailable when exclusive mode is active.

ERROR CODEDescription
BASS_ERROR_WASAPIWASAPI is not available.
BASS_ERROR_DEVICEdevice is not valid.
BASS_ERROR_DRIVERThe device driver does not support level retrieval.
BASS_ERROR_ILLPARAMchan is not valid.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also

Reference