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

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

Issue 3011193002: Removed the timeout for the delay estimate quality. (Closed)
Patch Set: Fixed unit tests Created 3 years, 3 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
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/render_delay_controller.cc
diff --git a/webrtc/modules/audio_processing/aec3/render_delay_controller.cc b/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
index d5d8a144784ad23c651b35c729b3fa290489fe40..565bf43f0b44e364a0be3f673c6cbe4f8a3cc898 100644
--- a/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
@@ -42,10 +42,10 @@ class RenderDelayControllerImpl final : public RenderDelayController {
private:
static int instance_count_;
std::unique_ptr<ApmDataDumper> data_dumper_;
- size_t delay_ = 0;
peah-webrtc 2017/09/11 12:31:42 This is a bit of an unrelated change, but I includ
+ size_t delay_ = kMinEchoPathDelayBlocks;
EchoPathDelayEstimator delay_estimator_;
size_t blocks_since_last_delay_estimate_ = 300000;
- int echo_path_delay_samples_ = 0;
+ int echo_path_delay_samples_ = kMinEchoPathDelayBlocks * kBlockSize;
size_t align_call_counter_ = 0;
rtc::Optional<size_t> headroom_samples_;
RenderDelayControllerMetrics metrics_;
@@ -85,7 +85,7 @@ RenderDelayControllerImpl::~RenderDelayControllerImpl() = default;
void RenderDelayControllerImpl::Reset() {
delay_ = kMinEchoPathDelayBlocks;
blocks_since_last_delay_estimate_ = 300000;
- echo_path_delay_samples_ = 0;
peah-webrtc 2017/09/11 12:31:42 This is a bit of an unrelated change, but since I
+ echo_path_delay_samples_ = delay_ * kBlockSize;
align_call_counter_ = 0;
headroom_samples_ = rtc::Optional<size_t>();
@@ -124,8 +124,6 @@ size_t RenderDelayControllerImpl::GetDelay(
RTC_DCHECK_LE(0, headroom);
headroom_samples_ = rtc::Optional<size_t>(headroom);
}
- } else if (++blocks_since_last_delay_estimate_ > 20 * kNumBlocksPerSecond) {
- headroom_samples_ = rtc::Optional<size_t>();
}
metrics_.Update(echo_path_delay_samples, delay_);
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698