共用方式為


AudioCaptureEffectsManager 類別

定義

代表音訊擷取效果管理員,可用來探索裝置上特定媒體類別和音訊處理模式的音訊處理鏈結。

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
繼承
Object Platform::Object IInspectable AudioCaptureEffectsManager
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

下列範例示範 CaptureEffectsManager.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;
}

備註

若要建立 AudioCaptureEffectsManager 的實例,請呼叫 AudioEffectsManager.CreateAudioCaptureEffectsManager。 或者,您可以藉由存取 屬性,從 AudioDeviceController 取得這個類別的 AudioCaptureEffectsManager 實例。

如需如何在轉譯和擷取音訊裝置上查詢和監視音訊效果 的範例,請參閱音訊效果探索範例

方法

GetAudioCaptureEffects()

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

事件

AudioCaptureEffectsChanged

當音訊進程鏈結變更時發生。

適用於

另請參閱