Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: webrtc/modules/audio_processing/aec3/output_selector.h

Issue 2678423005: Finalization of the first version of EchoCanceller 3 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/output_selector.h
diff --git a/webrtc/modules/audio_processing/aec3/output_selector.h b/webrtc/modules/audio_processing/aec3/output_selector.h
new file mode 100644
index 0000000000000000000000000000000000000000..991d05a4829d82e5bed1bf404a82f44163a354c6
--- /dev/null
+++ b/webrtc/modules/audio_processing/aec3/output_selector.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017 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 WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_
+
+#include <algorithm>
aleloi 2017/02/13 16:44:50 Not used in this header.
peah-webrtc 2017/02/20 07:37:17 Done.
+
+#include "webrtc/base/array_view.h"
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
aleloi 2017/02/13 16:44:50 Also not used here.
peah-webrtc 2017/02/20 07:37:17 Done.
+
+namespace webrtc {
+
+// Performs the selection betwween the which of the linear aec output and the
+// microphone signal should be used as the echo suppressor output.
+class OutputSelector {
+ public:
+ OutputSelector();
+ ~OutputSelector();
+
+ // Forms the most appropriate output signal.
+ void FormLinearOutput(rtc::ArrayView<const float> linear_aec_output,
aleloi 2017/02/13 16:44:50 linear_aec_output is also called subtractor_output
peah-webrtc 2017/02/20 07:37:17 Done.
+ rtc::ArrayView<float> capture);
+
+ // Returns true if the linear aec output is the one used.
+ bool UseSubtractorOutput() const { return use_subtractor_output_; }
+
+ private:
+ bool use_subtractor_output_ = false;
+ int output_change_counter_ = 0;
+ RTC_DISALLOW_COPY_AND_ASSIGN(OutputSelector);
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_OUTPUT_SELECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698