Share via


AudioStateMonitor.CreateForRenderMonitoring Method

Definition

Overloads

CreateForRenderMonitoring()

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for all audio render streams.

CreateForRenderMonitoring(AudioRenderCategory)

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio render streams with the specified MediaCategory.

CreateForRenderMonitoring(AudioRenderCategory, AudioDeviceRole)

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for render streams with the specified MediaCategory and AudioDeviceRole.

CreateForRenderMonitoring()

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for all audio render streams.

public:
 static AudioStateMonitor ^ CreateForRenderMonitoring();
/// [Windows.Foundation.Metadata.Overload("CreateForRenderMonitoring")]
 static AudioStateMonitor CreateForRenderMonitoring();
[Windows.Foundation.Metadata.Overload("CreateForRenderMonitoring")]
public static AudioStateMonitor CreateForRenderMonitoring();
function createForRenderMonitoring()
Public Shared Function CreateForRenderMonitoring () 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

CreateForRenderMonitoring(AudioRenderCategory)

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for audio render streams with the specified MediaCategory.

public:
 static AudioStateMonitor ^ CreateForRenderMonitoring(AudioRenderCategory category);
/// [Windows.Foundation.Metadata.Overload("CreateForRenderMonitoringWithCategory")]
 static AudioStateMonitor CreateForRenderMonitoring(AudioRenderCategory const& category);
[Windows.Foundation.Metadata.Overload("CreateForRenderMonitoringWithCategory")]
public static AudioStateMonitor CreateForRenderMonitoring(AudioRenderCategory category);
function createForRenderMonitoring(category)
Public Shared Function CreateForRenderMonitoring (category As AudioRenderCategory) As AudioStateMonitor

Parameters

category
AudioRenderCategory

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

CreateForRenderMonitoring(AudioRenderCategory, AudioDeviceRole)

Initializes a new instance of the AudioStateMonitor class that monitors the sound level for render streams with the specified MediaCategory and AudioDeviceRole.

public:
 static AudioStateMonitor ^ CreateForRenderMonitoring(AudioRenderCategory category, AudioDeviceRole role);
/// [Windows.Foundation.Metadata.Overload("CreateForRenderMonitoringWithCategoryAndDeviceRole")]
 static AudioStateMonitor CreateForRenderMonitoring(AudioRenderCategory const& category, AudioDeviceRole const& role);
[Windows.Foundation.Metadata.Overload("CreateForRenderMonitoringWithCategoryAndDeviceRole")]
public static AudioStateMonitor CreateForRenderMonitoring(AudioRenderCategory category, AudioDeviceRole role);
function createForRenderMonitoring(category, role)
Public Shared Function CreateForRenderMonitoring (category As AudioRenderCategory, role As AudioDeviceRole) As AudioStateMonitor

Parameters

category
AudioRenderCategory

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.

Applies to