Index: webrtc/modules/audio_processing/aec3/block_processor.h |
diff --git a/webrtc/modules/audio_processing/aec3/block_processor.h b/webrtc/modules/audio_processing/aec3/block_processor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b9c0be19aa969b3c49e3e5393169144d452c7bda |
--- /dev/null |
+++ b/webrtc/modules/audio_processing/aec3/block_processor.h |
@@ -0,0 +1,50 @@ |
+/* |
+ * 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. |
+ */ |
+ |
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ |
+#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ |
+ |
+#include <memory> |
+ |
+#include "webrtc/base/array_view.h" |
+#include "webrtc/base/constructormagic.h" |
+#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" |
+ |
+namespace webrtc { |
+ |
+/* Class for performing echo cancellation on 64 sample blocks of audio data */ |
hlundin-webrtc
2016/12/16 10:04:46
// style
peah-webrtc
2016/12/20 10:10:24
Done.
|
+class BlockProcessor { |
+ public: |
+ BlockProcessor(ApmDataDumper* data_dumper, |
+ int sample_rate_hz, |
+ size_t num_bands); |
+ ~BlockProcessor(); |
+ |
+ /* Processes a block of capture data */ |
hlundin-webrtc
2016/12/16 10:04:46
// style
peah-webrtc
2016/12/20 10:10:24
Done.
|
+ void ProcessCapture(bool known_echo_path_change, |
+ bool saturated_microphone_signal, |
+ rtc::ArrayView<float> capture_block); |
+ |
+ /* Buffers a block of render data supplied by a FrameBlocker object */ |
hlundin-webrtc
2016/12/16 10:04:46
// style
peah-webrtc
2016/12/20 10:10:24
Done.
|
+ template <typename F> |
+ bool BufferRender(F&& blocker) { |
aleloi
2016/12/16 15:04:31
Perhaps change type to std::function<void(ArrayVie
peah-webrtc
2016/12/20 10:10:24
That are definitely valid points! I addressed thes
|
+ // Use blocker to access render data. |
+ return true; |
+ } |
+ |
+ void ReportEchoLeakage(bool leakage_detected) {} |
+ |
+ private: |
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockProcessor); |
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_ |