BASS_WASAPI_GetDeviceLevel

Retrieves the level (peak amplitude) of a device.

float BASS_WASAPI_GetDeviceLevel(
    DWORD device,
    int chan
);

Parameters

deviceThe device to get the level from.
chanThe channel to get the level of... 0 = first channel, -1 = all channels.

Return value

If successful, the level is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

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!

Remarks

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

See also

BASS_WASAPI_GetDeviceInfo, BASS_WASAPI_GetLevel