Index: webrtc/modules/audio_processing/aec3/block_processor.cc |
diff --git a/webrtc/modules/audio_processing/aec3/block_processor.cc b/webrtc/modules/audio_processing/aec3/block_processor.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a1bf92b85a7aeb14635d577e009ab2974e439dab |
--- /dev/null |
+++ b/webrtc/modules/audio_processing/aec3/block_processor.cc |
@@ -0,0 +1,63 @@ |
+/* |
+ * Copyright (c) 2016 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. |
+ */ |
+#include "webrtc/modules/audio_processing/aec3/block_processor.h" |
+ |
+#include "webrtc/base/atomicops.h" |
+#include "webrtc/base/optional.h" |
+ |
+namespace webrtc { |
+namespace { |
+ |
+class BlockProcessorImpl final : public BlockProcessor { |
+ public: |
+ BlockProcessorImpl(int sample_rate_hz, size_t num_bands); |
+ ~BlockProcessorImpl() override; |
+ |
+ void ProcessCapture(bool known_echo_path_change, |
+ bool saturated_microphone_signal, |
+ std::vector<std::vector<float>>* capture_block) override; |
+ |
+ bool BufferRender(std::vector<std::vector<float>>* block) override; |
+ |
+ void ReportEchoLeakage(bool leakage_detected) override; |
+ |
+ private: |
+ static int instance_count_; |
+ std::unique_ptr<ApmDataDumper> data_dumper_; |
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockProcessorImpl); |
+}; |
+ |
+int BlockProcessorImpl::instance_count_ = 0; |
+ |
+BlockProcessorImpl::BlockProcessorImpl(int sample_rate_hz, size_t num_bands) |
+ : data_dumper_(new ApmDataDumper(instance_count_)) { |
+ instance_count_ = rtc::AtomicOps::Increment(&instance_count_); |
+} |
+ |
+BlockProcessorImpl::~BlockProcessorImpl() = default; |
+ |
+void BlockProcessorImpl::ProcessCapture( |
+ bool known_echo_path_change, |
+ bool saturated_microphone_signal, |
+ std::vector<std::vector<float>>* capture_block) {} |
+ |
+bool BlockProcessorImpl::BufferRender(std::vector<std::vector<float>>* block) { |
+ return false; |
+} |
+ |
+void BlockProcessorImpl::ReportEchoLeakage(bool leakage_detected) {} |
+ |
+} // namespace |
+ |
+BlockProcessor* BlockProcessor::Create(int sample_rate_hz, size_t num_bands) { |
+ return new BlockProcessorImpl(sample_rate_hz, num_bands); |
+} |
+ |
+} // namespace webrtc |