Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 2.15 KB

nc-audiostatemonitorapi-audiostatemonitorcallback.md

File metadata and controls

66 lines (53 loc) · 2.15 KB
UID tech.root title ms.date targetos description prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs helpviewer_keywords
NC:audiostatemonitorapi.AudioStateMonitorCallback
CoreAudio
AudioStateMonitorCallback
06/21/2023
Windows
Occurs when the system changes the sound level of the audio streams being monitored by an IAudioStreamStateMonitor.
false
function
audiostatemonitorapi.h
Windows build 19043
apiref
LibDef
audiostatemonitorapi.h
AudioStateMonitorCallback
AudioStateMonitorCallback
audiostatemonitorapi/AudioStateMonitorCallback
c++
AudioStateMonitorCallback

-description

Called when the system changes the sound level of the audio streams being monitored by an IAudioStateMonitor.

-parameters

-param audioStateMonitor [in]

The IAudioStateMonitor with which the callback was registered.

-param context [in, optional]

A void pointer that points to context information provided by the client in the call to IAudioStateMonitor::RegisterCallback.

-remarks

Windows dynamically mutes or lowers the level of audio streams in response to system events. For example, the volume of a podcast app's audio render stream may be lowered while an alarm is ringing. Or an audio recording app may have their capture stream muted when the app moves to the background. Register an implementation of this callback with a call to IAudioStateMonitor::RegisterCallback to receive notifications when the sound level for a stream changes, and then call IAudioStateMonitor::GetSoundLevel property to determine the new current audio level.

-see-also