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

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

Issue 2444793005: Moved the AECM render sample queue into the audio processing module (Closed)
Patch Set: Rebase Created 4 years, 2 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/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 dc1b72c559db829ea0d5386c6e16881a4babb7de..571de36add8483b74fee43e99bdd8803b3f915f3 100644
--- a/webrtc/modules/audio_processing/echo_control_mobile_impl.h
+++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.h
@@ -31,7 +31,7 @@ class EchoControlMobileImpl : public EchoControlMobile {
~EchoControlMobileImpl() override;
- int ProcessRenderAudio(const AudioBuffer* audio);
+ void ProcessRenderAudio(rtc::ArrayView<const int16_t> packed_render_audio);
int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms);
// EchoControlMobile implementation.
@@ -43,8 +43,13 @@ class EchoControlMobileImpl : public EchoControlMobile {
size_t num_reverse_channels,
size_t num_output_channels);
- // Reads render side data that has been queued on the render call.
- void ReadQueuedRenderData();
+ static void PackRenderAudioBuffer(const AudioBuffer* audio,
+ size_t num_output_channels,
+ size_t num_channels,
+ std::vector<int16_t>* packed_buffer);
+
+ static size_t NumCancellersRequired(size_t num_output_channels,
+ size_t num_reverse_channels);
private:
class Canceller;
@@ -57,9 +62,6 @@ class EchoControlMobileImpl : public EchoControlMobile {
int SetEchoPath(const void* echo_path, size_t size_bytes) override;
int GetEchoPath(void* echo_path, size_t size_bytes) const override;
- size_t num_handles_required() const;
-
- void AllocateRenderQueue();
int Configure();
rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
@@ -72,17 +74,6 @@ class EchoControlMobileImpl : public EchoControlMobile {
unsigned char* external_echo_path_ GUARDED_BY(crit_render_)
GUARDED_BY(crit_capture_);
- size_t render_queue_element_max_size_ GUARDED_BY(crit_render_)
- GUARDED_BY(crit_capture_);
-
- std::vector<int16_t> render_queue_buffer_ GUARDED_BY(crit_render_);
- std::vector<int16_t> capture_queue_buffer_ GUARDED_BY(crit_capture_);
-
- // Lock protection not needed.
- std::unique_ptr<
- SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>>
- render_signal_queue_;
-
std::vector<std::unique_ptr<Canceller>> cancellers_;
std::unique_ptr<StreamProperties> stream_properties_;
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_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