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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 1208313003: audio_processing: Changed kMinDiffDelayMs from 50 to 60 ms (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 void AudioProcessingImpl::InitializeBeamformer() { 993 void AudioProcessingImpl::InitializeBeamformer() {
994 if (beamformer_enabled_) { 994 if (beamformer_enabled_) {
995 if (!beamformer_) { 995 if (!beamformer_) {
996 beamformer_.reset(new NonlinearBeamformer(array_geometry_)); 996 beamformer_.reset(new NonlinearBeamformer(array_geometry_));
997 } 997 }
998 beamformer_->Initialize(kChunkSizeMs, split_rate_); 998 beamformer_->Initialize(kChunkSizeMs, split_rate_);
999 } 999 }
1000 } 1000 }
1001 1001
1002 void AudioProcessingImpl::MaybeUpdateHistograms() { 1002 void AudioProcessingImpl::MaybeUpdateHistograms() {
1003 static const int kMinDiffDelayMs = 50; 1003 static const int kMinDiffDelayMs = 60;
1004 1004
1005 if (echo_cancellation()->is_enabled()) { 1005 if (echo_cancellation()->is_enabled()) {
1006 // Detect a jump in platform reported system delay and log the difference. 1006 // Detect a jump in platform reported system delay and log the difference.
1007 const int diff_stream_delay_ms = stream_delay_ms_ - last_stream_delay_ms_; 1007 const int diff_stream_delay_ms = stream_delay_ms_ - last_stream_delay_ms_;
1008 if (diff_stream_delay_ms > kMinDiffDelayMs && last_stream_delay_ms_ != 0) { 1008 if (diff_stream_delay_ms > kMinDiffDelayMs && last_stream_delay_ms_ != 0) {
1009 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.PlatformReportedStreamDelayJump", 1009 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.PlatformReportedStreamDelayJump",
1010 diff_stream_delay_ms, kMinDiffDelayMs, 1000, 100); 1010 diff_stream_delay_ms, kMinDiffDelayMs, 1000, 100);
1011 } 1011 }
1012 last_stream_delay_ms_ = stream_delay_ms_; 1012 last_stream_delay_ms_ = stream_delay_ms_;
1013 1013
1014 // Detect a jump in AEC system delay and log the difference. 1014 // Detect a jump in AEC system delay and log the difference.
1015 const int frames_per_ms = rtc::CheckedDivExact(split_rate_, 1000); 1015 const int frames_per_ms = rtc::CheckedDivExact(split_rate_, 1000);
1016 const int aec_system_delay_ms = 1016 const int aec_system_delay_ms =
1017 WebRtcAec_system_delay(echo_cancellation()->aec_core()) / frames_per_ms; 1017 WebRtcAec_system_delay(echo_cancellation()->aec_core()) / frames_per_ms;
1018 const int diff_aec_system_delay_ms = aec_system_delay_ms - 1018 const int diff_aec_system_delay_ms = aec_system_delay_ms -
1019 last_aec_system_delay_ms_; 1019 last_aec_system_delay_ms_;
1020 if (diff_aec_system_delay_ms > kMinDiffDelayMs && 1020 if (diff_aec_system_delay_ms > kMinDiffDelayMs &&
1021 last_aec_system_delay_ms_ != 0) { 1021 last_aec_system_delay_ms_ != 0) {
1022 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.AecSystemDelayJump", 1022 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.AecSystemDelayJump",
1023 diff_aec_system_delay_ms, kMinDiffDelayMs, 1000, 1023 diff_aec_system_delay_ms, kMinDiffDelayMs, 1000,
1024 100); 1024 100);
1025 } 1025 }
1026 last_aec_system_delay_ms_ = aec_system_delay_ms; 1026 last_aec_system_delay_ms_ = aec_system_delay_ms;
1027 // TODO(bjornv): Consider also logging amount of jumps. This gives a better
1028 // indication of how frequent jumps are.
1027 } 1029 }
1028 } 1030 }
1029 1031
1030 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 1032 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
1031 int AudioProcessingImpl::WriteMessageToDebugFile() { 1033 int AudioProcessingImpl::WriteMessageToDebugFile() {
1032 int32_t size = event_msg_->ByteSize(); 1034 int32_t size = event_msg_->ByteSize();
1033 if (size <= 0) { 1035 if (size <= 0) {
1034 return kUnspecifiedError; 1036 return kUnspecifiedError;
1035 } 1037 }
1036 #if defined(WEBRTC_ARCH_BIG_ENDIAN) 1038 #if defined(WEBRTC_ARCH_BIG_ENDIAN)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 int err = WriteMessageToDebugFile(); 1070 int err = WriteMessageToDebugFile();
1069 if (err != kNoError) { 1071 if (err != kNoError) {
1070 return err; 1072 return err;
1071 } 1073 }
1072 1074
1073 return kNoError; 1075 return kNoError;
1074 } 1076 }
1075 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP 1077 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
1076 1078
1077 } // namespace webrtc 1079 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698