#pragma once #include #include #include #include #include #include #include #include #include class CAECCapture : public Microsoft::WRL::RuntimeClass< Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::ClassicCom >, Microsoft::WRL::FtmBase > { public: HRESULT StartCapture(); HRESULT StopCapture(); HRESULT SetEchoCancellationRenderEndpoint(PCWSTR aecReferenceEndpointId); private: HRESULT InitializeCaptureClient(); HRESULT IsAcousticEchoCancellationEffectPresent(bool* result); HRESULT RecordCommunicationsStream(); std::thread _captureThread; wil::com_ptr_nothrow _captureClient; wil::com_ptr_nothrow _audioClient; wil::unique_event_nothrow _terminationEvent; };