AudioStateMonitor.CreateForCaptureMonitoring Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateForCaptureMonitoring() |
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for all audio capture streams. |
CreateForCaptureMonitoring(MediaCategory) |
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio capture streams with the specified MediaCategory. |
CreateForCaptureMonitoring(MediaCategory, AudioDeviceRole) |
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio capture streams with the specified MediaCategory and AudioDeviceRole. |
CreateForCaptureMonitoring()
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for all audio capture streams.
public:
static AudioStateMonitor ^ CreateForCaptureMonitoring();
/// [Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoring")]
static AudioStateMonitor CreateForCaptureMonitoring();
[Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoring")]
public static AudioStateMonitor CreateForCaptureMonitoring();
function createForCaptureMonitoring()
Public Shared Function CreateForCaptureMonitoring () As AudioStateMonitor
Returns
An AudioStateMonitor object.
- Attributes
Remarks
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 MediaCategory, AudioDeviceRole, the ID of the associated audio device, and whether the stream is capturing or rendering audio.
Applies to
CreateForCaptureMonitoring(MediaCategory)
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio capture streams with the specified MediaCategory.
public:
static AudioStateMonitor ^ CreateForCaptureMonitoring(MediaCategory category);
/// [Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoringWithCategory")]
static AudioStateMonitor CreateForCaptureMonitoring(MediaCategory const& category);
[Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoringWithCategory")]
public static AudioStateMonitor CreateForCaptureMonitoring(MediaCategory category);
function createForCaptureMonitoring(category)
Public Shared Function CreateForCaptureMonitoring (category As MediaCategory) As AudioStateMonitor
Parameters
- category
- 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.
Returns
An AudioStateMonitor object.
- Attributes
Remarks
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.
Applies to
CreateForCaptureMonitoring(MediaCategory, AudioDeviceRole)
Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio capture streams with the specified MediaCategory and AudioDeviceRole.
public:
static AudioStateMonitor ^ CreateForCaptureMonitoring(MediaCategory category, AudioDeviceRole role);
/// [Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoringWithCategoryAndDeviceRole")]
static AudioStateMonitor CreateForCaptureMonitoring(MediaCategory const& category, AudioDeviceRole const& role);
[Windows.Foundation.Metadata.Overload("CreateForCaptureMonitoringWithCategoryAndDeviceRole")]
public static AudioStateMonitor CreateForCaptureMonitoring(MediaCategory category, AudioDeviceRole role);
function createForCaptureMonitoring(category, role)
Public Shared Function CreateForCaptureMonitoring (category As MediaCategory, role As AudioDeviceRole) As AudioStateMonitor
Parameters
- category
- 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.
- role
- AudioDeviceRole
A value from the AudioDeviceRole enumeration indicating the device role of audio streams that will be monitored. The system may use the device role of an audio stream to determine if it should be muted or have its volume lowered in response to a particular system event.
Returns
An AudioStateMonitor object.
- Attributes
Remarks
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 the ID of the associated audio device and whether the stream is capturing or rendering audio.