IAcousticEchoCancellationControl インターフェイス (audioclient.h)

オーディオ キャプチャ エンドポイントが音響エコー キャンセル (AEC) をサポートしているかどうかを判断するメカニズムを提供し、サポートされている場合は、クライアントが参照ストリームとして使用するオーディオ レンダリング エンドポイントを設定できるようにします。

継承

IAcousticEchoCancellationControl インターフェイスは、IUnknown インターフェイスから継承されます。

メソッド

IAcousticEchoCancellationControl インターフェイスには、これらのメソッドがあります。

 
IAcousticEchoCancellationControl::SetEchoCancellationRenderEndpoint

音響エコー キャンセル (AEC) の参照ストリームとして使用するオーディオ レンダリング エンドポイントを設定します。

注釈

次の例は、 IAcousticEchoCancellationControl インターフェイスの使用方法を示しています。 IAudioClient::GetService を呼び出し、IAcousticEchoCancellationControl インターフェイスの IID を渡します。 成功した場合、キャプチャ エンドポイントは AEC のループバック参照エンドポイントの制御をサポートします。 エンドポイントは AEC をサポートしている可能性がありますが、AEC のループバック参照エンドポイントの制御をサポートしない場合があることに注意してください。 SetEchoCancellationRenderEndpoint を呼び出して、AEC の参照ストリームを設定します。 GetService の呼び出しがE_NOINTERFACEで失敗した場合、エンドポイントに対する AEC 効果 (サポートされている場合) では、ループバック参照エンドポイントの制御は許可されません。

wil::com_ptr_nothrow<IAudioClient> audioClient;

RETURN_IF_FAILED(device->Activate(_uuidof(IAudioClient), CLSCTX_INPROC_SERVER, nullptr, (void **)&audioClient));

// Call Initialize before calling GetService
// Implementation of IAudioClient::Initialize has been omitted from this sample for brevity.

RETURN_IF_FAILED(audioClient->Initialize(…));

// If the capture endpoint supports acoustic echo cancellation (AEC), pass it the endpoint id of the
// audio render endpoint that should be used as the reference stream. If the capture endpoint does not
// support AEC, the GetService call fails with E_NOINTERFACE, so errors from GetService are not
// treated as fatal.

wil::com_ptr_nothrow<IAcousticEchoCancellationControl> audioAcousticEchoCancellationControl;

if (SUCCEEDED(audioClient->GetService(IID_PPV_ARGS(&audioAcousticEchoCancellationControl))))
{

RETURN_IF_FAILED(audioAcousticEchoCancellationControl-> SetEchoCancellationRenderEndpoint(endpointIdOfReferenceAudioStream));

}

要件

要件
サポートされている最小のクライアント Windows ビルド 22621
Header audioclient.h