Compartilhar via


AudioCaptureEffectsManager.GetAudioCaptureEffects Método

Definição

Obtém a lista de efeitos de áudio no dispositivo.

public:
 virtual IVectorView<AudioEffect ^> ^ GetAudioCaptureEffects() = GetAudioCaptureEffects;
IVectorView<AudioEffect> GetAudioCaptureEffects();
public IReadOnlyList<AudioEffect> GetAudioCaptureEffects();
function getAudioCaptureEffects()
Public Function GetAudioCaptureEffects () As IReadOnlyList(Of AudioEffect)

Retornos

A lista de efeitos de áudio.

Exemplos

O exemplo a seguir demonstra o GetAudioCaptureEffects para detectar se o efeito DeepNoiseSuppression está presente no dispositivo de captura especificado.

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;
}

Aplica-se a