mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 22:00:47 +01:00

This CL adds two unit tests to make sure that, when an echo path gain change occurs, the echo canceller is notified. Such a change can be caused by (i) a pre-amplifier gain change or (ii) an analog gain change. Bug: webrtc:7494 Change-Id: Ia47cfbbc5694340cd3e760d8d3c3393f79897a9d Reviewed-on: https://webrtc-review.googlesource.com/c/111780 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26190}
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef MODULES_AUDIO_PROCESSING_TEST_ECHO_CONTROL_MOCK_H_
|
|
#define MODULES_AUDIO_PROCESSING_TEST_ECHO_CONTROL_MOCK_H_
|
|
|
|
#include "api/audio/echo_control.h"
|
|
#include "test/gmock.h"
|
|
|
|
namespace webrtc {
|
|
|
|
class AudioBuffer;
|
|
|
|
class MockEchoControl : public EchoControl {
|
|
public:
|
|
MOCK_METHOD1(AnalyzeRender, void(AudioBuffer* render));
|
|
MOCK_METHOD1(AnalyzeCapture, void(AudioBuffer* capture));
|
|
MOCK_METHOD2(ProcessCapture,
|
|
void(AudioBuffer* capture, bool echo_path_change));
|
|
MOCK_CONST_METHOD0(GetMetrics, EchoControl::Metrics());
|
|
MOCK_METHOD1(SetAudioBufferDelay, void(size_t delay_ms));
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_AUDIO_PROCESSING_TEST_ECHO_CONTROL_MOCK_H_
|