CreateCaptureAudioStateMonitorForCategoryAndDeviceId function (audiostatemonitorapi.h)
Creates a new instance of IAudioStateMonitor for capture streams with the specified audio category and audio device ID.
Syntax
HRESULT CreateCaptureAudioStateMonitorForCategoryAndDeviceId(
[in] AUDIO_STREAM_CATEGORY category,
[in] PCWSTR deviceId,
[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] deviceId
The unique identifier of the audio device for which the audio state monitor is created. The endpoint may be specified using the MMDevice ID, obtained using IMMDevice::GetId, or by using its SWD ID, obtained using Windows.Devices.Enumeration or Windows.Media.Devices.MediaDevice.
[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 |