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

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

Issue 2444283002: Moved the AGC 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/gain_control_impl.h
diff --git a/webrtc/modules/audio_processing/gain_control_impl.h b/webrtc/modules/audio_processing/gain_control_impl.h
index 1af6d7b246e8048f066f10af7325edfc47e040a5..812b88cb8d2dac6afc17c4a016c6e8525e495726 100644
--- a/webrtc/modules/audio_processing/gain_control_impl.h
+++ b/webrtc/modules/audio_processing/gain_control_impl.h
@@ -31,21 +31,21 @@ class GainControlImpl : public GainControl {
rtc::CriticalSection* crit_capture);
~GainControlImpl() override;
- int ProcessRenderAudio(AudioBuffer* audio);
+ void ProcessRenderAudio(rtc::ArrayView<const int16_t> packed_render_audio);
int AnalyzeCaptureAudio(AudioBuffer* audio);
int ProcessCaptureAudio(AudioBuffer* audio, bool stream_has_echo);
void Initialize(size_t num_proc_channels, int sample_rate_hz);
+ static void PackRenderAudioBuffer(AudioBuffer* audio,
+ std::vector<int16_t>* packed_buffer);
+
// GainControl implementation.
bool is_enabled() const override;
int stream_analog_level() override;
bool is_limiter_enabled() const override;
Mode mode() const override;
- // Reads render side data that has been queued on the render call.
- void ReadQueuedRenderData();
-
int compression_gain_db() const override;
private:
@@ -64,7 +64,6 @@ class GainControlImpl : public GainControl {
int analog_level_maximum() const override;
bool stream_is_saturated() const override;
- void AllocateRenderQueue();
int Configure();
rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
@@ -82,16 +81,6 @@ class GainControlImpl : public GainControl {
bool was_analog_level_set_ GUARDED_BY(crit_capture_);
bool stream_is_saturated_ 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<GainController>> gain_controllers_;
rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_);
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/gain_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698