-api-id | -api-type |
---|---|
M:Windows.Media.Audio.AudioStateMonitor.CreateForCaptureMonitoring(Windows.Media.Capture.MediaCategory) |
winrt method |
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio capture streams with the specified MediaCategory.
A value from the MediaCategory enumeration indicating the categories of audio streams that will be monitored. The system may use the category of an audio stream to determine if it should be muted or have its volume lowered in response to a particular system event.
An AudioStateMonitor object.
The method you use to instantiate AudioStateMonitor determines which audio streams are monitored. Other factory methods of the AudioStateMonitor class allow you to monitor the level of audio streams based on their AudioDeviceRole, the ID of the associated audio device, and whether the stream is capturing or rendering audio.