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

Unified Diff: webrtc/modules/audio_processing/echo_control_mobile_impl.h

Issue 1410833002: Lock scheme #4: Introduced the render sample queue for the aec and aecm (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@aec_error_report_CL
Patch Set: Merge with latest master Created 5 years, 1 month 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/echo_control_mobile_impl.h
diff --git a/webrtc/modules/audio_processing/echo_control_mobile_impl.h b/webrtc/modules/audio_processing/echo_control_mobile_impl.h
index da7022545f245171a3353a59f55fc991273d57f6..87c5376d68f0c9fef8d12e4631cf35e94c2ec556 100644
--- a/webrtc/modules/audio_processing/echo_control_mobile_impl.h
+++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/common_audio/swap_queue.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/processing_component.h"
@@ -37,7 +39,16 @@ class EchoControlMobileImpl : public EchoControlMobile,
// ProcessingComponent implementation.
int Initialize() override;
+ // Reads render side data that has been queued on the render call.
+ void ReadQueuedRenderData();
+
private:
+ static const size_t kAllowedValuesOfSamplesPerFrame1 = 80;
+ static const size_t kAllowedValuesOfSamplesPerFrame2 = 160;
+ // TODO(peah): Decrease this once we properly handle hugely unbalanced
+ // reverse and forward call numbers.
+ static const size_t kMaxNumFramesToBuffer = 100;
+
// EchoControlMobile implementation.
int Enable(bool enable) override;
int set_routing_mode(RoutingMode mode) override;
@@ -53,11 +64,20 @@ class EchoControlMobileImpl : public EchoControlMobile,
int num_handles_required() const override;
int GetHandleError(void* handle) const override;
+ void AllocateRenderQueue();
+
const AudioProcessing* apm_;
CriticalSectionWrapper* crit_;
RoutingMode routing_mode_;
bool comfort_noise_enabled_;
unsigned char* external_echo_path_;
+
+ size_t render_queue_element_max_size_;
+ std::vector<int16_t> render_queue_buffer_;
+ std::vector<int16_t> capture_queue_buffer_;
+ rtc::scoped_ptr<
+ SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>>
+ render_signal_queue_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_processing/echo_cancellation_impl.cc ('k') | webrtc/modules/audio_processing/echo_control_mobile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698