CreateRenderAudioStateMonitorForCategory
[Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.] Creates a new instance of IAudioStateMonitor that monitors the audio level of all audio-rendering streams in the specified category.Syntax
Parameters
categoryType: AUDIO_STREAM_CATEGORY A member of the AUDIO_STREAM_CATEGORY enumeration that specifies the category of the audio-rendering streams to be monitored. audioStateMonitor _Out_
Type: IAudioStateMonitor** This output parameter is populated with the created
IAudioStateMonitor object.
Return value
Type: HRESULT category A member of the AUDIO_STREAM_CATEGORY enumeration that specifies the category of audio render streams to be monitored. audioStateMonitor [out] This output parameter is populated with the createdIAudioStateMonitor object.
Return Value
If the method succeeds, it returnsS\_OK.
Remarks
This is one of the functions that create and return an AudioStateMonitor instance. There are four variants each for capture and render streams that determine whether a process can do one of the following for a given role:- Capture or render any audio of any category
- Capture or render audio of a specific category
- Capture or render audio of a specific category, to a specific endpoint.
The endpoint may be specified using theMMDeviceID (obtained usingIMMDevice::GetId()), or by using itsSWDID (obtained usingWindows.Devices.EnumerationorWindows.Media.Devices.MediaDevice) - Capture or render audio of a specific category to the default endpoint
