Skip to main content

IAudioStateMonitor interface

Provides methods for desktop apps and games to discover when their audio streams sound levels are modified by the system. This includes scenarios like the following:
  • Knowing when a game media stream is muted because an audio app is playing in the background or
  • Knowing when to stop a game chat audio stream because a VOIP call has started in the background.
Provides methods that allow desktop apps and games to determine the time their audio streams’ sound levels are modified by the system. This includes scenarios in which a game or an app needs to determine the following:
  • The time a game media stream is muted because an audio app is playing in the background
  • The time to stop a game chat audio stream because a VoIP call has started in the background
The sound level can be checked and monitored for render as well as capture streams. Monitored streams can be selected by category, audio endpoint, or device role. The sound level that a new stream would have can be checked before the stream is created. This API is equivalent to the Windows.Media.Audio.AudiostateMonitor class, which is available for UWP apps but not for desktop apps and games. This interface can’t be used by UWP apps.

Members

The IAudioStateMonitor interface inherits from the IUnknown interface but also has these types of members:

Methods

The IAudioStateMonitor interface has these methods:

Remarks

To get an instance of this interface, call one of these methods: The following example code demonstrates the scenario where a game registers for audio level notifications for its audio render streams in the AudioCategory_GameMedia category. If the sound level for this category is muted, the game will stop playback of its game media stream. If the sound level is set to any other value, the game media stream is played.

Requirements

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

See also

About WASAPI
Last modified on August 20, 2026