Move EchoControl out of audio_processing.h.
Bug: webrtc:8844 Change-Id: Id05c285e0e377774c79da8552959733f823d8bb4 Reviewed-on: https://webrtc-review.googlesource.com/47900 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21898}
This commit is contained in:

committed by
Commit Bot

parent
1c3509f7d3
commit
8e467dfa6d
@ -155,6 +155,7 @@ rtc_static_library("audio_processing") {
|
|||||||
"include/audio_processing.h",
|
"include/audio_processing.h",
|
||||||
"include/config.cc",
|
"include/config.cc",
|
||||||
"include/config.h",
|
"include/config.h",
|
||||||
|
"include/echo_control.h",
|
||||||
"level_controller/biquad_filter.cc",
|
"level_controller/biquad_filter.cc",
|
||||||
"level_controller/biquad_filter.h",
|
"level_controller/biquad_filter.h",
|
||||||
"level_controller/down_sampler.cc",
|
"level_controller/down_sampler.cc",
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "modules/audio_processing/beamformer/array_util.h"
|
#include "modules/audio_processing/beamformer/array_util.h"
|
||||||
#include "modules/audio_processing/include/audio_processing_statistics.h"
|
#include "modules/audio_processing/include/audio_processing_statistics.h"
|
||||||
#include "modules/audio_processing/include/config.h"
|
#include "modules/audio_processing/include/config.h"
|
||||||
|
#include "modules/audio_processing/include/echo_control.h"
|
||||||
#include "rtc_base/arraysize.h"
|
#include "rtc_base/arraysize.h"
|
||||||
#include "rtc_base/deprecation.h"
|
#include "rtc_base/deprecation.h"
|
||||||
#include "rtc_base/platform_file.h"
|
#include "rtc_base/platform_file.h"
|
||||||
@ -48,7 +49,6 @@ class ProcessingConfig;
|
|||||||
|
|
||||||
class EchoCancellation;
|
class EchoCancellation;
|
||||||
class EchoControlMobile;
|
class EchoControlMobile;
|
||||||
class EchoControlFactory;
|
|
||||||
class EchoDetector;
|
class EchoDetector;
|
||||||
class GainControl;
|
class GainControl;
|
||||||
class HighPassFilter;
|
class HighPassFilter;
|
||||||
@ -913,37 +913,6 @@ class EchoControlMobile {
|
|||||||
virtual ~EchoControlMobile() {}
|
virtual ~EchoControlMobile() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Interface for an acoustic echo cancellation (AEC) submodule.
|
|
||||||
class EchoControl {
|
|
||||||
public:
|
|
||||||
// Analysis (not changing) of the render signal.
|
|
||||||
virtual void AnalyzeRender(AudioBuffer* render) = 0;
|
|
||||||
|
|
||||||
// Analysis (not changing) of the capture signal.
|
|
||||||
virtual void AnalyzeCapture(AudioBuffer* capture) = 0;
|
|
||||||
|
|
||||||
// Processes the capture signal in order to remove the echo.
|
|
||||||
virtual void ProcessCapture(AudioBuffer* capture, bool echo_path_change) = 0;
|
|
||||||
|
|
||||||
struct Metrics {
|
|
||||||
double echo_return_loss;
|
|
||||||
double echo_return_loss_enhancement;
|
|
||||||
int delay_ms;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Collect current metrics from the echo controller.
|
|
||||||
virtual Metrics GetMetrics() const = 0;
|
|
||||||
|
|
||||||
virtual ~EchoControl() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Interface for a factory that creates EchoControllers.
|
|
||||||
class EchoControlFactory {
|
|
||||||
public:
|
|
||||||
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz) = 0;
|
|
||||||
virtual ~EchoControlFactory() = default;
|
|
||||||
};
|
|
||||||
|
|
||||||
// The automatic gain control (AGC) component brings the signal to an
|
// The automatic gain control (AGC) component brings the signal to an
|
||||||
// appropriate range. This is done by applying a digital gain directly and, in
|
// appropriate range. This is done by applying a digital gain directly and, in
|
||||||
// the analog mode, prescribing an analog gain to be applied at the audio HAL.
|
// the analog mode, prescribing an analog gain to be applied at the audio HAL.
|
||||||
|
52
modules/audio_processing/include/echo_control.h
Normal file
52
modules/audio_processing/include/echo_control.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* 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_INCLUDE_ECHO_CONTROL_H_
|
||||||
|
#define MODULES_AUDIO_PROCESSING_INCLUDE_ECHO_CONTROL_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
class AudioBuffer;
|
||||||
|
|
||||||
|
// Interface for an acoustic echo cancellation (AEC) submodule.
|
||||||
|
class EchoControl {
|
||||||
|
public:
|
||||||
|
// Analysis (not changing) of the render signal.
|
||||||
|
virtual void AnalyzeRender(AudioBuffer* render) = 0;
|
||||||
|
|
||||||
|
// Analysis (not changing) of the capture signal.
|
||||||
|
virtual void AnalyzeCapture(AudioBuffer* capture) = 0;
|
||||||
|
|
||||||
|
// Processes the capture signal in order to remove the echo.
|
||||||
|
virtual void ProcessCapture(AudioBuffer* capture, bool echo_path_change) = 0;
|
||||||
|
|
||||||
|
struct Metrics {
|
||||||
|
double echo_return_loss;
|
||||||
|
double echo_return_loss_enhancement;
|
||||||
|
int delay_ms;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Collect current metrics from the echo controller.
|
||||||
|
virtual Metrics GetMetrics() const = 0;
|
||||||
|
|
||||||
|
virtual ~EchoControl() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for a factory that creates EchoControllers.
|
||||||
|
class EchoControlFactory {
|
||||||
|
public:
|
||||||
|
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz) = 0;
|
||||||
|
virtual ~EchoControlFactory() = default;
|
||||||
|
};
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // MODULES_AUDIO_PROCESSING_INCLUDE_ECHO_CONTROL_H_
|
Reference in New Issue
Block a user