AudioCaptureEffectsManager.GetAudioCaptureEffects 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得裝置上的音訊效果清單。
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;
}