BASS_WASAPI_GetLevel

Retrieves the level (peak amplitude).

DWORD BASS_WASAPI_GetLevel();

Return value

If an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. If successful, the level of the left channel is returned in the low word (low 16 bits), and the level of the right channel is returned in the high word (high 16 bits). If the channel is mono, then the low word is duplicated in the high word. The level ranges linearly from 0 (silent) to 32768 (max). 0 will be returned when a channel is stalled.

Error codes

BASS_ERROR_INITBASS_WASAPI_Init has not been successfully called.
BASS_ERROR_NOTAVAILThe BASS_WASAPI_BUFFER flag was not specified in the device's initialization.

Remarks

This function uses BASS_ChannelGetLevel internally, so it behaves identically to that.

The BASS_WASAPI_BUFFER flag needs to have been specified in the device's initialization to enable the use of this function.

More flexible level retrieval is available with BASS_WASAPI_GetLevelEx.

See also

BASS_WASAPI_GetData, BASS_WASAPI_GetDeviceLevel, BASS_WASAPI_GetLevelEx

BASS_ChannelGetLevel