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

Unified Diff: webrtc/modules/audio_processing/aec3/render_transfer_buffer.cc

Issue 2584493002: Added first layer of the echo canceller 3 functionality (Closed)
Patch Set: Restricted the AnalyzeRender access, added ability to add external reporting of echo failure, and o… Created 4 years 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/render_transfer_buffer.cc
diff --git a/webrtc/modules/audio_processing/aec3/render_transfer_buffer.cc b/webrtc/modules/audio_processing/aec3/render_transfer_buffer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c303e87550e3f506d5313d155230a685c582a2e4
--- /dev/null
+++ b/webrtc/modules/audio_processing/aec3/render_transfer_buffer.cc
@@ -0,0 +1,39 @@
+/*
+ * 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/render_transfer_buffer.h"
+
+#include <memory>
+
+namespace webrtc {
+
+RenderTransferBufferWriter::~RenderTransferBufferWriter() {}
hlundin-webrtc 2016/12/16 10:04:48 = default
peah-webrtc 2016/12/20 10:10:26 I have removed this class in the new patch. Done.
+
+RenderTransferBuffer::RenderTransferBuffer(size_t num_bands,
+ size_t frame_length)
+ : queue_(kQueueSize,
+ std::vector<float>(num_bands * frame_length),
+ RenderQueueItemVerifier<float>(num_bands * frame_length)),
+ frame_(num_bands * frame_length, 0.f) {
+ queue_.Clear();
hlundin-webrtc 2016/12/16 10:04:47 What does Clear() do on top of the ctor?
peah-webrtc 2016/12/20 10:10:26 I have removed this class in the new patch. Done.
+}
+
+RenderTransferBuffer::~RenderTransferBuffer() {}
hlundin-webrtc 2016/12/16 10:04:48 = default
peah-webrtc 2016/12/20 10:10:26 I have removed this class in the new patch. Done.
+
+bool RenderTransferBuffer::Insert(std::vector<float>* frame) {
+ return queue_.Insert(frame);
+}
+
+bool RenderTransferBuffer::Remove(std::vector<float>* frame) {
+ bool result = queue_.Remove(frame);
hlundin-webrtc 2016/12/16 10:04:47 Why the local storage in result?
peah-webrtc 2016/12/20 10:10:26 I have removed this class in the new patch. Done.
+ return result;
+}
+
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698