Commit 86187090 authored by Max Morin's avatar Max Morin Committed by Commit Bot

Limit number of warnings for large audio delay.

Bug: 881224
Change-Id: Ic6f18c1a7b5164175a70c9ebaade6722244b02fa
Reviewed-on: https://chromium-review.googlesource.com/1208271Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589133}
parent 1055dd5b
...@@ -752,9 +752,10 @@ int MediaStreamAudioProcessor::ProcessData(const float* const* process_ptrs, ...@@ -752,9 +752,10 @@ int MediaStreamAudioProcessor::ProcessData(const float* const* process_ptrs,
render_delay_ms); render_delay_ms);
int total_delay_ms = capture_delay_ms + render_delay_ms; int total_delay_ms = capture_delay_ms + render_delay_ms;
if (total_delay_ms > 300) { if (total_delay_ms > 300 && large_delay_log_count_ < 10) {
LOG(WARNING) << "Large audio delay, capture delay: " << capture_delay_ms LOG(WARNING) << "Large audio delay, capture delay: " << capture_delay_ms
<< "ms; render delay: " << render_delay_ms << "ms"; << "ms; render delay: " << render_delay_ms << "ms";
++large_delay_log_count_;
} }
webrtc::AudioProcessing* ap = audio_processing_.get(); webrtc::AudioProcessing* ap = audio_processing_.get();
......
...@@ -213,6 +213,7 @@ class CONTENT_EXPORT MediaStreamAudioProcessor ...@@ -213,6 +213,7 @@ class CONTENT_EXPORT MediaStreamAudioProcessor
// Counters to avoid excessively logging errors in OnPlayoutData. // Counters to avoid excessively logging errors in OnPlayoutData.
size_t unsupported_buffer_size_log_count_ = 0; size_t unsupported_buffer_size_log_count_ = 0;
size_t apm_playout_error_code_log_count_ = 0; size_t apm_playout_error_code_log_count_ = 0;
size_t large_delay_log_count_ = 0;
// Object for logging UMA stats for echo information when the AEC is enabled. // Object for logging UMA stats for echo information when the AEC is enabled.
// Accessed on the main render thread. // Accessed on the main render thread.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment