BASS.NET API for the Un4seen BASS Audio LibraryBassWasapiBASS_WASAPI_GetVolume Method BASS.NET API for the Un4seen BASS Audio Library
Retrieves the current volume level.

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_GetVolume(
	BASSWASAPIVolume curve
)

Parameters

curve
Type: Un4seen.BassWasapiBASSWASAPIVolume
Volume curve to use, one of the following:
BASS_WASAPI_CURVE_DBLogarithmic curve.
BASS_WASAPI_CURVE_LINEARLinear curve.
BASS_WASAPI_CURVE_WINDOWSWindows' hybrid curve.
BASS_WASAPI_VOL_SESSIONGet the session volume, else the device volume.

Return Value

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

Session volume always uses the BASS_WASAPI_CURVE_WINDOWS curve.

When using multiple devices, the current thread's device setting (as set with BASS_WASAPI_SetDevice(Int32)) determines which device this function call applies to.

ERROR CODEDescription
BASS_ERROR_INITBASS_WASAPI_Init(Int32, Int32, Int32, BASSWASAPIInit, Single, Single, WASAPIPROC, IntPtr) has not been successfully called.
BASS_ERROR_NOTAVAILThere is no volume control available.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also

Reference