Sets the volume of the current Wasapi device/driver (endpoint).
Namespace: Un4seen.BassWasapi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("basswasapi")] public static bool BASS_WASAPI_SetVolume( BASSWASAPIVolume curve, float volume )
Parameters
- curve
- Type: Un4seen.BassWasapiBASSWASAPIVolume
Volume curve to use, one of the following:BASS_WASAPI_CURVE_DB Logarithmic curve. BASS_WASAPI_CURVE_LINEAR Linear curve. BASS_WASAPI_CURVE_WINDOWS Windows' hybrid curve. BASS_WASAPI_VOL_SESSION Set the session volume, else the device volume. - volume
- Type: SystemSingle
The new volume to set between 0.0 (silent) and 1.0 (maximum) if linear, or else a dB level.
Return Value
Type: BooleanReturns on success, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
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 CODE | Description |
---|---|
BASS_ERROR_INIT | BASS_WASAPI_Init(Int32, Int32, Int32, BASSWASAPIInit, Single, Single, WASAPIPROC, IntPtr) has not been successfully called. |
BASS_ERROR_NOTAVAIL | There is no volume control available. |
BASS_ERROR_ILLPARAM | volume is invalid. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
See Also