| OLD | NEW |
| 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 MaybeUpdateHistograms(); | 1094 MaybeUpdateHistograms(); |
| 1095 | 1095 |
| 1096 AudioBuffer* capture_buffer = capture_.capture_audio.get(); // For brevity. | 1096 AudioBuffer* capture_buffer = capture_.capture_audio.get(); // For brevity. |
| 1097 | 1097 |
| 1098 rms_.Analyze(rtc::ArrayView<const int16_t>( | 1098 rms_.Analyze(rtc::ArrayView<const int16_t>( |
| 1099 capture_buffer->channels_const()[0], | 1099 capture_buffer->channels_const()[0], |
| 1100 capture_nonlocked_.capture_processing_format.num_frames())); | 1100 capture_nonlocked_.capture_processing_format.num_frames())); |
| 1101 if (++rms_interval_counter_ >= 1000) { | 1101 if (++rms_interval_counter_ >= 1000) { |
| 1102 rms_interval_counter_ = 0; | 1102 rms_interval_counter_ = 0; |
| 1103 RmsLevel::Levels levels = rms_.AverageAndPeak(); | 1103 RmsLevel::Levels levels = rms_.AverageAndPeak(); |
| 1104 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.ApmCaptureInputLevelAverage", | 1104 RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.ApmCaptureInputLevelAverageRms", |
| 1105 levels.average, 1, RmsLevel::kMinLevelDb, 100); | 1105 levels.average, 1, RmsLevel::kMinLevelDb, 64); |
| 1106 RTC_HISTOGRAM_COUNTS("WebRTC.Audio.ApmCaptureInputLevelPeak", levels.peak, | 1106 RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.ApmCaptureInputLevelPeakRms", |
| 1107 1, RmsLevel::kMinLevelDb, 100); | 1107 levels.peak, 1, RmsLevel::kMinLevelDb, 64); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 if (constants_.use_experimental_agc && | 1110 if (constants_.use_experimental_agc && |
| 1111 public_submodules_->gain_control->is_enabled()) { | 1111 public_submodules_->gain_control->is_enabled()) { |
| 1112 private_submodules_->agc_manager->AnalyzePreProcess( | 1112 private_submodules_->agc_manager->AnalyzePreProcess( |
| 1113 capture_buffer->channels()[0], capture_buffer->num_channels(), | 1113 capture_buffer->channels()[0], capture_buffer->num_channels(), |
| 1114 capture_nonlocked_.capture_processing_format.num_frames()); | 1114 capture_nonlocked_.capture_processing_format.num_frames()); |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 if (submodule_states_.CaptureMultiBandSubModulesActive() && | 1117 if (submodule_states_.CaptureMultiBandSubModulesActive() && |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1891 capture_processing_format(kSampleRate16kHz), | 1891 capture_processing_format(kSampleRate16kHz), |
| 1892 split_rate(kSampleRate16kHz) {} | 1892 split_rate(kSampleRate16kHz) {} |
| 1893 | 1893 |
| 1894 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1894 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
| 1895 | 1895 |
| 1896 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1896 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
| 1897 | 1897 |
| 1898 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1898 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
| 1899 | 1899 |
| 1900 } // namespace webrtc | 1900 } // namespace webrtc |
| OLD | NEW |