AudioCaptureEffectsManager.GetAudioCaptureEffects 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.
Gets the list of audio effects on the device.
public:
virtual IVectorView<AudioEffect ^> ^ GetAudioCaptureEffects() = GetAudioCaptureEffects;
IVectorView<AudioEffect> GetAudioCaptureEffects();
public IReadOnlyList<AudioEffect> GetAudioCaptureEffects();
function getAudioCaptureEffects()
Public Function GetAudioCaptureEffects () As IReadOnlyList(Of AudioEffect)
Returns
The list of audio effects.
Examples
The following example demonstrates the 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;
}