Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates a new instance of IAudioStateMonitor for render streams with the specified audio category and audio device role.
Syntax
HRESULT CreateRenderAudioStateMonitorForCategoryAndDeviceRole(
[in] AUDIO_STREAM_CATEGORY category,
[in] ERole role,
[out] IAudioStateMonitor **audioStateMonitor
);
Parameters
[in] category
A member of the AUDIO_STREAM_CATEGORY enumeration specifying the audio stream category for which the audio state monitor is created.
[in] role
A member of the ERole enumeration specifying the audio device role for which the audio state monitor is created.
[out] audioStateMonitor
Receives a pointer to the created IAudioStateMonitor.
Return value
Returns an HRESULT including the following values.
| Value | Description |
|---|---|
| S_OK | Success. |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows build 19043 |
| Header | audiostatemonitorapi.h |
| Library | windows.media.mediacontrol.lib |