Share via


AudioCaptureEffectsManager Class

Definition

Represents an audio capture effects manager which can be used to discover the audio processing chain on a device for a specific media category and audio processing mode.

public ref class AudioCaptureEffectsManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class AudioCaptureEffectsManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class AudioCaptureEffectsManager
Public NotInheritable Class AudioCaptureEffectsManager
Inheritance
Object Platform::Object IInspectable AudioCaptureEffectsManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

The following example demonstrates the CaptureEffectsManager.GetAudioCaptureEffects to detect whether the DeepNoiseSuppression effect is present on the specified capture device.

private bool IsDeepNoiseSuppressionSupported()
{
    var captureEffectsManager = Windows.Media.Effects.AudioEffectsManager.CreateAudioCaptureEffectsManager(
        MediaDevice.GetDefaultAudioCaptureId(AudioDeviceRole.Default),
        Windows.Media.Capture.MediaCategory.Speech,
        Windows.Media.AudioProcessing.Default);

    // Check for the presence of DeepNoiseSuppression
    IReadOnlyList<AudioEffect> effectslist = captureEffectsManager.GetAudioCaptureEffects();
    for (int i = 0; i < effectslist.Count; i++)
    {
        if (effectslist[i].AudioEffectType == Windows.Media.Effects.AudioEffectsType.DeepNoiseSuppression)
        {
            return true;
        }
    }

    return false;
}

Remarks

To create an instance of AudioCaptureEffectsManager, call AudioEffectsManager.CreateAudioCaptureEffectsManager. Or, you can get an instance of this class from an AudioDeviceController by accessing the AudioCaptureEffectsManager property.

See the Audio effects discovery sample for an example of how to query and monitor audio effects on render and capture audio devices.

Methods

GetAudioCaptureEffects()

Gets the list of audio effects on the device.

Events

AudioCaptureEffectsChanged

Occurs when audio process chain changes.

Applies to

See also