Added EchoControlFactory interface.
The factory for EchoControl is changed from an rtc::Callback1 to an
interface. This avoids using rtc::Callback1 outside of WebRTC.
This also makes the EchoControl factory more similar to other
factories in the code base.
Bug: webrtc:8345
Change-Id: Ie61b9416ed771f8c756326736d17e339eb768469
Reviewed-on: https://webrtc-review.googlesource.com/8900
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20272}
diff --git a/modules/audio_processing/include/mock_audio_processing.h b/modules/audio_processing/include/mock_audio_processing.h
index c7a0f51..d037e56 100644
--- a/modules/audio_processing/include/mock_audio_processing.h
+++ b/modules/audio_processing/include/mock_audio_processing.h
@@ -112,6 +112,15 @@
MOCK_CONST_METHOD0(ToString, std::string());
};
+class MockEchoControl : public EchoControl {
+ public:
+ virtual ~MockEchoControl() {}
+ MOCK_METHOD1(AnalyzeRender, void(AudioBuffer* render));
+ MOCK_METHOD1(AnalyzeCapture, void(AudioBuffer* capture));
+ MOCK_METHOD2(ProcessCapture,
+ void(AudioBuffer* capture, bool echo_path_change));
+};
+
class MockVoiceDetection : public VoiceDetection {
public:
virtual ~MockVoiceDetection() {}