AudioDeviceController AudioDeviceController AudioDeviceController AudioDeviceController Class

Definition

Controls device settings on the microphone.

public : sealed class AudioDeviceController : IAudioDeviceController, IMediaDeviceController
public sealed class AudioDeviceController : IAudioDeviceController, IMediaDeviceController
Public NotInheritable Class AudioDeviceController Implements IAudioDeviceController, IMediaDeviceController
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

To get an instance of this object, retrieve the MediaCapture.AudioDeviceController property.

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Properties

Muted Muted Muted Muted

Mutes or unmutes the microphone.

public : Platform::Boolean Muted { get; set; }
public bool Muted { get; set; }
Public ReadWrite Property Muted As bool
var bool = audioDeviceController.muted;
audioDeviceController.muted = bool;
Value
Platform::Boolean bool bool bool

True if the microphone is muted; false otherwise.

VolumePercent VolumePercent VolumePercent VolumePercent

Gets or sets the volume of the microphone.

public : float VolumePercent { get; set; }
public float VolumePercent { get; set; }
Public ReadWrite Property VolumePercent As float
var float = audioDeviceController.volumePercent;
audioDeviceController.volumePercent = float;
Value
float float float float

The volume of the microphone. The value ranges from 0.0 (silent) to 100.0 (full volume).

Methods

GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType)

Gets a list of the supported encoding properties for the device.

public : IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)
public IReadOnlyList<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)
Public Function GetAvailableMediaStreamProperties(mediaStreamType As MediaStreamType) As IReadOnlyList<IMediaEncodingProperties>( Of IMediaEncodingProperties )
var iVectorView = audioDeviceController.getAvailableMediaStreamProperties(mediaStreamType);
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to get the properties.

Returns
IVectorView<IMediaEncodingProperties> IReadOnlyList<IMediaEncodingProperties> IReadOnlyList<IMediaEncodingProperties> IReadOnlyList<IMediaEncodingProperties>

A list of the supported encoding properties.

GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType)

Gets the encoding properties for the specified media stream type for the device.

public : IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)
public IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)
Public Function GetMediaStreamProperties(mediaStreamType As MediaStreamType) As IMediaEncodingProperties
var iMediaEncodingProperties = audioDeviceController.getMediaStreamProperties(mediaStreamType);
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to get the properties.

Returns

SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)

Sets the encoding properties asynchronously for the specified media stream type for the device.

public : IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)
public IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)
Public Function SetMediaStreamPropertiesAsync(mediaStreamType As MediaStreamType, mediaEncodingProperties As IMediaEncodingProperties) As IAsyncAction
var iAsyncAction = audioDeviceController.setMediaStreamPropertiesAsync(mediaStreamType, mediaEncodingProperties);
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to set the properties.

Returns

An IAsyncAction object that is used to control the asynchronous operation.