Move echo_control.h to api/audio

Bug: webrtc:8844
Change-Id: I5c2406c43ade786c26e12b3c847fed8424283df0
Reviewed-on: https://webrtc-review.googlesource.com/53700
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22031}
diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn
index b2b952c..ba0cf99 100644
--- a/modules/audio_processing/BUILD.gn
+++ b/modules/audio_processing/BUILD.gn
@@ -155,7 +155,6 @@
     "include/audio_processing.h",
     "include/config.cc",
     "include/config.h",
-    "include/echo_control.h",
     "level_controller/biquad_filter.cc",
     "level_controller/biquad_filter.h",
     "level_controller/down_sampler.cc",
@@ -223,6 +222,7 @@
     "../../:typedefs",
     "../../api:aec3_config",
     "../../api:array_view",
+    "../../api:echo_control",
     "../../api:optional",
     "../../audio/utility:audio_frame_operations",
     "../../common_audio:common_audio_c",
diff --git a/modules/audio_processing/aec3/echo_remover.h b/modules/audio_processing/aec3/echo_remover.h
index 8e5663c..ca83e76 100644
--- a/modules/audio_processing/aec3/echo_remover.h
+++ b/modules/audio_processing/aec3/echo_remover.h
@@ -14,10 +14,10 @@
 #include <vector>
 
 #include "api/audio/echo_canceller3_config.h"
+#include "api/audio/echo_control.h"
 #include "api/optional.h"
 #include "modules/audio_processing/aec3/echo_path_variability.h"
 #include "modules/audio_processing/aec3/render_buffer.h"
-#include "modules/audio_processing/include/audio_processing.h"
 
 namespace webrtc {
 
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 457d97a..50ec430 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -23,11 +23,11 @@
 #include <vector>
 
 #include "api/audio/echo_canceller3_config.h"
+#include "api/audio/echo_control.h"
 #include "api/optional.h"
 #include "modules/audio_processing/beamformer/array_util.h"
 #include "modules/audio_processing/include/audio_processing_statistics.h"
 #include "modules/audio_processing/include/config.h"
-#include "modules/audio_processing/include/echo_control.h"
 #include "rtc_base/arraysize.h"
 #include "rtc_base/deprecation.h"
 #include "rtc_base/platform_file.h"
diff --git a/modules/audio_processing/include/echo_control.h b/modules/audio_processing/include/echo_control.h
deleted file mode 100644
index 7fe4f3b..0000000
--- a/modules/audio_processing/include/echo_control.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  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_