共用方式為


AudioCaptureEffectsManager.GetAudioCaptureEffects 方法

定義

取得裝置上的音訊效果清單。

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

傳回

音訊效果的清單。

範例

下列範例示範 GetAudioCaptureEffects ,以偵測指定的擷取裝置上是否有 DeepNoiseSuppression 效果。

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

適用於