-api-id | -api-type |
---|---|
T:Windows.Media.Effects.AudioCaptureEffectsManager |
winrt class |
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.
To create an instance of AudioCaptureEffectsManager, call AudioEffectsManager.CreateAudioCaptureEffectsManager. Or, you can get an instance of this class from an xref:Windows.Media.Devices.AudioDeviceController by accessing the xref:Windows.Media.Devices.AudioDeviceController.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.
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;
}