Skip to main content

AudioStateMonitorCallback

The callback function, registered by calling IAudioStateMonitor::RegisterCallback, is called by the system when the sound level of the audio streams associated with the IAudioStateMonitor changes.

Syntax

Parameters

audioStateMonitor _Out_
Type: IAudioStateMonitor*
The IAudioStateMonitor interface with which the callback was registered. Call the interface’s GetSoundLevel method to get the new current sound level of the associated audio streams. context
Type: void*
An app-defined context object passed into the RegisterCallback method.

Return value

This callback function does not return a value.

Remarks

For convenience, Audiostatemonitorapi.h defines a pointer type for this callback as PAudioStateMonitorCallback. The following code example shows how to register a new callback with AudioStateMonitor. For convenience, Audiostatemonitorapi.h defines a pointer type for this callback as PAudioStateMonitorCallback.

Requirements

Header: Audiostatemonitorapi.h Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

AUDIO_STREAM_CATEGORY About WASAPI WASAPI
Last modified on August 20, 2026