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 |
11 #include "webrtc/modules/audio_processing/audio_processing_impl.h" | 11 #include "webrtc/modules/audio_processing/audio_processing_impl.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <algorithm> | 14 #include <algorithm> |
| 15 #include <string> |
15 | 16 |
16 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/logging.h" | 18 #include "webrtc/base/logging.h" |
18 #include "webrtc/base/platform_file.h" | 19 #include "webrtc/base/platform_file.h" |
19 #include "webrtc/base/trace_event.h" | 20 #include "webrtc/base/trace_event.h" |
20 #include "webrtc/common_audio/audio_converter.h" | 21 #include "webrtc/common_audio/audio_converter.h" |
21 #include "webrtc/common_audio/channel_buffer.h" | 22 #include "webrtc/common_audio/channel_buffer.h" |
22 #include "webrtc/common_audio/include/audio_util.h" | 23 #include "webrtc/common_audio/include/audio_util.h" |
23 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 24 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
24 #include "webrtc/modules/audio_processing/aec/aec_core.h" | 25 #include "webrtc/modules/audio_processing/aec/aec_core.h" |
25 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" | 26 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" |
| 27 #include "webrtc/modules/audio_processing/agc2/gain_controller2.h" |
26 #include "webrtc/modules/audio_processing/agc/agc_manager_direct.h" | 28 #include "webrtc/modules/audio_processing/agc/agc_manager_direct.h" |
27 #include "webrtc/modules/audio_processing/audio_buffer.h" | 29 #include "webrtc/modules/audio_processing/audio_buffer.h" |
28 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" | 30 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" |
29 #include "webrtc/modules/audio_processing/common.h" | 31 #include "webrtc/modules/audio_processing/common.h" |
30 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" | 32 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" |
31 #include "webrtc/modules/audio_processing/echo_control_mobile_impl.h" | 33 #include "webrtc/modules/audio_processing/echo_control_mobile_impl.h" |
32 #include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h" | 34 #include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h" |
33 #include "webrtc/modules/audio_processing/gain_control_impl.h" | 35 #include "webrtc/modules/audio_processing/gain_control_impl.h" |
34 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 36 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
35 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc
er.h" | 37 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc
er.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 166 |
165 bool AudioProcessingImpl::ApmSubmoduleStates::Update( | 167 bool AudioProcessingImpl::ApmSubmoduleStates::Update( |
166 bool low_cut_filter_enabled, | 168 bool low_cut_filter_enabled, |
167 bool echo_canceller_enabled, | 169 bool echo_canceller_enabled, |
168 bool mobile_echo_controller_enabled, | 170 bool mobile_echo_controller_enabled, |
169 bool residual_echo_detector_enabled, | 171 bool residual_echo_detector_enabled, |
170 bool noise_suppressor_enabled, | 172 bool noise_suppressor_enabled, |
171 bool intelligibility_enhancer_enabled, | 173 bool intelligibility_enhancer_enabled, |
172 bool beamformer_enabled, | 174 bool beamformer_enabled, |
173 bool adaptive_gain_controller_enabled, | 175 bool adaptive_gain_controller_enabled, |
| 176 bool gain_controller2_enabled, |
174 bool level_controller_enabled, | 177 bool level_controller_enabled, |
175 bool echo_canceller3_enabled, | 178 bool echo_canceller3_enabled, |
176 bool voice_activity_detector_enabled, | 179 bool voice_activity_detector_enabled, |
177 bool level_estimator_enabled, | 180 bool level_estimator_enabled, |
178 bool transient_suppressor_enabled) { | 181 bool transient_suppressor_enabled) { |
179 bool changed = false; | 182 bool changed = false; |
180 changed |= (low_cut_filter_enabled != low_cut_filter_enabled_); | 183 changed |= (low_cut_filter_enabled != low_cut_filter_enabled_); |
181 changed |= (echo_canceller_enabled != echo_canceller_enabled_); | 184 changed |= (echo_canceller_enabled != echo_canceller_enabled_); |
182 changed |= | 185 changed |= |
183 (mobile_echo_controller_enabled != mobile_echo_controller_enabled_); | 186 (mobile_echo_controller_enabled != mobile_echo_controller_enabled_); |
184 changed |= | 187 changed |= |
185 (residual_echo_detector_enabled != residual_echo_detector_enabled_); | 188 (residual_echo_detector_enabled != residual_echo_detector_enabled_); |
186 changed |= (noise_suppressor_enabled != noise_suppressor_enabled_); | 189 changed |= (noise_suppressor_enabled != noise_suppressor_enabled_); |
187 changed |= | 190 changed |= |
188 (intelligibility_enhancer_enabled != intelligibility_enhancer_enabled_); | 191 (intelligibility_enhancer_enabled != intelligibility_enhancer_enabled_); |
189 changed |= (beamformer_enabled != beamformer_enabled_); | 192 changed |= (beamformer_enabled != beamformer_enabled_); |
190 changed |= | 193 changed |= |
191 (adaptive_gain_controller_enabled != adaptive_gain_controller_enabled_); | 194 (adaptive_gain_controller_enabled != adaptive_gain_controller_enabled_); |
| 195 changed |= |
| 196 (gain_controller2_enabled != gain_controller2_enabled_); |
192 changed |= (level_controller_enabled != level_controller_enabled_); | 197 changed |= (level_controller_enabled != level_controller_enabled_); |
193 changed |= (echo_canceller3_enabled != echo_canceller3_enabled_); | 198 changed |= (echo_canceller3_enabled != echo_canceller3_enabled_); |
194 changed |= (level_estimator_enabled != level_estimator_enabled_); | 199 changed |= (level_estimator_enabled != level_estimator_enabled_); |
195 changed |= | 200 changed |= |
196 (voice_activity_detector_enabled != voice_activity_detector_enabled_); | 201 (voice_activity_detector_enabled != voice_activity_detector_enabled_); |
197 changed |= (transient_suppressor_enabled != transient_suppressor_enabled_); | 202 changed |= (transient_suppressor_enabled != transient_suppressor_enabled_); |
198 if (changed) { | 203 if (changed) { |
199 low_cut_filter_enabled_ = low_cut_filter_enabled; | 204 low_cut_filter_enabled_ = low_cut_filter_enabled; |
200 echo_canceller_enabled_ = echo_canceller_enabled; | 205 echo_canceller_enabled_ = echo_canceller_enabled; |
201 mobile_echo_controller_enabled_ = mobile_echo_controller_enabled; | 206 mobile_echo_controller_enabled_ = mobile_echo_controller_enabled; |
202 residual_echo_detector_enabled_ = residual_echo_detector_enabled; | 207 residual_echo_detector_enabled_ = residual_echo_detector_enabled; |
203 noise_suppressor_enabled_ = noise_suppressor_enabled; | 208 noise_suppressor_enabled_ = noise_suppressor_enabled; |
204 intelligibility_enhancer_enabled_ = intelligibility_enhancer_enabled; | 209 intelligibility_enhancer_enabled_ = intelligibility_enhancer_enabled; |
205 beamformer_enabled_ = beamformer_enabled; | 210 beamformer_enabled_ = beamformer_enabled; |
206 adaptive_gain_controller_enabled_ = adaptive_gain_controller_enabled; | 211 adaptive_gain_controller_enabled_ = adaptive_gain_controller_enabled; |
| 212 gain_controller2_enabled_ = gain_controller2_enabled; |
207 level_controller_enabled_ = level_controller_enabled; | 213 level_controller_enabled_ = level_controller_enabled; |
208 echo_canceller3_enabled_ = echo_canceller3_enabled; | 214 echo_canceller3_enabled_ = echo_canceller3_enabled; |
209 level_estimator_enabled_ = level_estimator_enabled; | 215 level_estimator_enabled_ = level_estimator_enabled; |
210 voice_activity_detector_enabled_ = voice_activity_detector_enabled; | 216 voice_activity_detector_enabled_ = voice_activity_detector_enabled; |
211 transient_suppressor_enabled_ = transient_suppressor_enabled; | 217 transient_suppressor_enabled_ = transient_suppressor_enabled; |
212 } | 218 } |
213 | 219 |
214 changed |= first_update_; | 220 changed |= first_update_; |
215 first_update_ = false; | 221 first_update_ = false; |
216 return changed; | 222 return changed; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 std::unique_ptr<IntelligibilityEnhancer> intelligibility_enhancer; | 274 std::unique_ptr<IntelligibilityEnhancer> intelligibility_enhancer; |
269 #endif | 275 #endif |
270 }; | 276 }; |
271 | 277 |
272 struct AudioProcessingImpl::ApmPrivateSubmodules { | 278 struct AudioProcessingImpl::ApmPrivateSubmodules { |
273 explicit ApmPrivateSubmodules(NonlinearBeamformer* beamformer) | 279 explicit ApmPrivateSubmodules(NonlinearBeamformer* beamformer) |
274 : beamformer(beamformer) {} | 280 : beamformer(beamformer) {} |
275 // Accessed internally from capture or during initialization | 281 // Accessed internally from capture or during initialization |
276 std::unique_ptr<NonlinearBeamformer> beamformer; | 282 std::unique_ptr<NonlinearBeamformer> beamformer; |
277 std::unique_ptr<AgcManagerDirect> agc_manager; | 283 std::unique_ptr<AgcManagerDirect> agc_manager; |
| 284 std::unique_ptr<GainController2> gain_controller2; |
278 std::unique_ptr<LowCutFilter> low_cut_filter; | 285 std::unique_ptr<LowCutFilter> low_cut_filter; |
279 std::unique_ptr<LevelController> level_controller; | 286 std::unique_ptr<LevelController> level_controller; |
280 std::unique_ptr<ResidualEchoDetector> residual_echo_detector; | 287 std::unique_ptr<ResidualEchoDetector> residual_echo_detector; |
281 std::unique_ptr<EchoCanceller3> echo_canceller3; | 288 std::unique_ptr<EchoCanceller3> echo_canceller3; |
282 }; | 289 }; |
283 | 290 |
284 AudioProcessing* AudioProcessing::Create() { | 291 AudioProcessing* AudioProcessing::Create() { |
285 webrtc::Config config; | 292 webrtc::Config config; |
286 return Create(config, nullptr); | 293 return Create(config, nullptr); |
287 } | 294 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 InitializeIntelligibility(); | 518 InitializeIntelligibility(); |
512 #endif | 519 #endif |
513 InitializeLowCutFilter(); | 520 InitializeLowCutFilter(); |
514 public_submodules_->noise_suppression->Initialize(num_proc_channels(), | 521 public_submodules_->noise_suppression->Initialize(num_proc_channels(), |
515 proc_sample_rate_hz()); | 522 proc_sample_rate_hz()); |
516 public_submodules_->voice_detection->Initialize(proc_split_sample_rate_hz()); | 523 public_submodules_->voice_detection->Initialize(proc_split_sample_rate_hz()); |
517 public_submodules_->level_estimator->Initialize(); | 524 public_submodules_->level_estimator->Initialize(); |
518 InitializeLevelController(); | 525 InitializeLevelController(); |
519 InitializeResidualEchoDetector(); | 526 InitializeResidualEchoDetector(); |
520 InitializeEchoCanceller3(); | 527 InitializeEchoCanceller3(); |
| 528 InitializeGainController2(); |
521 | 529 |
522 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 530 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
523 if (debug_dump_.debug_file->is_open()) { | 531 if (debug_dump_.debug_file->is_open()) { |
524 int err = WriteInitMessage(); | 532 int err = WriteInitMessage(); |
525 if (err != kNoError) { | 533 if (err != kNoError) { |
526 return err; | 534 return err; |
527 } | 535 } |
528 } | 536 } |
529 #endif | 537 #endif |
530 | 538 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 } | 667 } |
660 | 668 |
661 if (config.echo_canceller3.enabled != | 669 if (config.echo_canceller3.enabled != |
662 capture_nonlocked_.echo_canceller3_enabled) { | 670 capture_nonlocked_.echo_canceller3_enabled) { |
663 capture_nonlocked_.echo_canceller3_enabled = | 671 capture_nonlocked_.echo_canceller3_enabled = |
664 config_.echo_canceller3.enabled; | 672 config_.echo_canceller3.enabled; |
665 InitializeEchoCanceller3(); | 673 InitializeEchoCanceller3(); |
666 LOG(LS_INFO) << "Echo canceller 3 activated: " | 674 LOG(LS_INFO) << "Echo canceller 3 activated: " |
667 << capture_nonlocked_.echo_canceller3_enabled; | 675 << capture_nonlocked_.echo_canceller3_enabled; |
668 } | 676 } |
| 677 |
| 678 config_ok = GainController2::Validate(config_.gain_controller2); |
| 679 if (!config_ok) { |
| 680 LOG(LS_ERROR) << "AudioProcessing module config error" << std::endl |
| 681 << "gain_controller2: " |
| 682 << GainController2::ToString(config_.gain_controller2) |
| 683 << std::endl |
| 684 << "Reverting to default parameter set"; |
| 685 config_.gain_controller2 = AudioProcessing::Config::GainController2(); |
| 686 } |
| 687 |
| 688 if (config.gain_controller2.enabled != |
| 689 capture_nonlocked_.gain_controller2_enabled) { |
| 690 capture_nonlocked_.gain_controller2_enabled = |
| 691 config_.gain_controller2.enabled; |
| 692 InitializeGainController2(); |
| 693 LOG(LS_INFO) << "Gain controller 2 activated: " |
| 694 << capture_nonlocked_.gain_controller2_enabled; |
| 695 } |
669 } | 696 } |
670 | 697 |
671 void AudioProcessingImpl::SetExtraOptions(const webrtc::Config& config) { | 698 void AudioProcessingImpl::SetExtraOptions(const webrtc::Config& config) { |
672 // Run in a single-threaded manner when setting the extra options. | 699 // Run in a single-threaded manner when setting the extra options. |
673 rtc::CritScope cs_render(&crit_render_); | 700 rtc::CritScope cs_render(&crit_render_); |
674 rtc::CritScope cs_capture(&crit_capture_); | 701 rtc::CritScope cs_capture(&crit_capture_); |
675 | 702 |
676 public_submodules_->echo_cancellation->SetExtraOptions(config); | 703 public_submodules_->echo_cancellation->SetExtraOptions(config); |
677 | 704 |
678 if (capture_.transient_suppressor_enabled != | 705 if (capture_.transient_suppressor_enabled != |
679 config.Get<ExperimentalNs>().enabled) { | 706 config.Get<ExperimentalNs>().enabled) { |
680 capture_.transient_suppressor_enabled = | 707 capture_.transient_suppressor_enabled = |
681 config.Get<ExperimentalNs>().enabled; | 708 config.Get<ExperimentalNs>().enabled; |
682 InitializeTransient(); | 709 InitializeTransient(); |
683 } | 710 } |
684 | 711 |
685 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 712 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
686 if(capture_nonlocked_.intelligibility_enabled != | 713 if (capture_nonlocked_.intelligibility_enabled != |
687 config.Get<Intelligibility>().enabled) { | 714 config.Get<Intelligibility>().enabled) { |
688 capture_nonlocked_.intelligibility_enabled = | 715 capture_nonlocked_.intelligibility_enabled = |
689 config.Get<Intelligibility>().enabled; | 716 config.Get<Intelligibility>().enabled; |
690 InitializeIntelligibility(); | 717 InitializeIntelligibility(); |
691 } | 718 } |
692 #endif | 719 #endif |
693 | 720 |
694 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD | 721 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD |
695 if (capture_nonlocked_.beamformer_enabled != | 722 if (capture_nonlocked_.beamformer_enabled != |
696 config.Get<Beamforming>().enabled) { | 723 config.Get<Beamforming>().enabled) { |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 | 1308 |
1282 public_submodules_->transient_suppressor->Suppress( | 1309 public_submodules_->transient_suppressor->Suppress( |
1283 capture_buffer->channels_f()[0], capture_buffer->num_frames(), | 1310 capture_buffer->channels_f()[0], capture_buffer->num_frames(), |
1284 capture_buffer->num_channels(), | 1311 capture_buffer->num_channels(), |
1285 capture_buffer->split_bands_const_f(0)[kBand0To8kHz], | 1312 capture_buffer->split_bands_const_f(0)[kBand0To8kHz], |
1286 capture_buffer->num_frames_per_band(), capture_buffer->keyboard_data(), | 1313 capture_buffer->num_frames_per_band(), capture_buffer->keyboard_data(), |
1287 capture_buffer->num_keyboard_frames(), voice_probability, | 1314 capture_buffer->num_keyboard_frames(), voice_probability, |
1288 capture_.key_pressed); | 1315 capture_.key_pressed); |
1289 } | 1316 } |
1290 | 1317 |
| 1318 if (capture_nonlocked_.gain_controller2_enabled) { |
| 1319 private_submodules_->gain_controller2->Process(capture_buffer); |
| 1320 } |
| 1321 |
1291 if (capture_nonlocked_.level_controller_enabled) { | 1322 if (capture_nonlocked_.level_controller_enabled) { |
1292 private_submodules_->level_controller->Process(capture_buffer); | 1323 private_submodules_->level_controller->Process(capture_buffer); |
1293 } | 1324 } |
1294 | 1325 |
1295 // The level estimator operates on the recombined data. | 1326 // The level estimator operates on the recombined data. |
1296 public_submodules_->level_estimator->ProcessStream(capture_buffer); | 1327 public_submodules_->level_estimator->ProcessStream(capture_buffer); |
1297 | 1328 |
1298 capture_output_rms_.Analyze(rtc::ArrayView<const int16_t>( | 1329 capture_output_rms_.Analyze(rtc::ArrayView<const int16_t>( |
1299 capture_buffer->channels_const()[0], | 1330 capture_buffer->channels_const()[0], |
1300 capture_nonlocked_.capture_processing_format.num_frames())); | 1331 capture_nonlocked_.capture_processing_format.num_frames())); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 bool AudioProcessingImpl::UpdateActiveSubmoduleStates() { | 1730 bool AudioProcessingImpl::UpdateActiveSubmoduleStates() { |
1700 return submodule_states_.Update( | 1731 return submodule_states_.Update( |
1701 config_.high_pass_filter.enabled, | 1732 config_.high_pass_filter.enabled, |
1702 public_submodules_->echo_cancellation->is_enabled(), | 1733 public_submodules_->echo_cancellation->is_enabled(), |
1703 public_submodules_->echo_control_mobile->is_enabled(), | 1734 public_submodules_->echo_control_mobile->is_enabled(), |
1704 config_.residual_echo_detector.enabled, | 1735 config_.residual_echo_detector.enabled, |
1705 public_submodules_->noise_suppression->is_enabled(), | 1736 public_submodules_->noise_suppression->is_enabled(), |
1706 capture_nonlocked_.intelligibility_enabled, | 1737 capture_nonlocked_.intelligibility_enabled, |
1707 capture_nonlocked_.beamformer_enabled, | 1738 capture_nonlocked_.beamformer_enabled, |
1708 public_submodules_->gain_control->is_enabled(), | 1739 public_submodules_->gain_control->is_enabled(), |
| 1740 capture_nonlocked_.gain_controller2_enabled, |
1709 capture_nonlocked_.level_controller_enabled, | 1741 capture_nonlocked_.level_controller_enabled, |
1710 capture_nonlocked_.echo_canceller3_enabled, | 1742 capture_nonlocked_.echo_canceller3_enabled, |
1711 public_submodules_->voice_detection->is_enabled(), | 1743 public_submodules_->voice_detection->is_enabled(), |
1712 public_submodules_->level_estimator->is_enabled(), | 1744 public_submodules_->level_estimator->is_enabled(), |
1713 capture_.transient_suppressor_enabled); | 1745 capture_.transient_suppressor_enabled); |
1714 } | 1746 } |
1715 | 1747 |
1716 | 1748 |
1717 void AudioProcessingImpl::InitializeTransient() { | 1749 void AudioProcessingImpl::InitializeTransient() { |
1718 if (capture_.transient_suppressor_enabled) { | 1750 if (capture_.transient_suppressor_enabled) { |
(...skipping 30 matching lines...) Expand all Loading... |
1749 } | 1781 } |
1750 | 1782 |
1751 void AudioProcessingImpl::InitializeLowCutFilter() { | 1783 void AudioProcessingImpl::InitializeLowCutFilter() { |
1752 if (config_.high_pass_filter.enabled) { | 1784 if (config_.high_pass_filter.enabled) { |
1753 private_submodules_->low_cut_filter.reset( | 1785 private_submodules_->low_cut_filter.reset( |
1754 new LowCutFilter(num_proc_channels(), proc_sample_rate_hz())); | 1786 new LowCutFilter(num_proc_channels(), proc_sample_rate_hz())); |
1755 } else { | 1787 } else { |
1756 private_submodules_->low_cut_filter.reset(); | 1788 private_submodules_->low_cut_filter.reset(); |
1757 } | 1789 } |
1758 } | 1790 } |
| 1791 |
1759 void AudioProcessingImpl::InitializeEchoCanceller3() { | 1792 void AudioProcessingImpl::InitializeEchoCanceller3() { |
1760 if (capture_nonlocked_.echo_canceller3_enabled) { | 1793 if (capture_nonlocked_.echo_canceller3_enabled) { |
1761 private_submodules_->echo_canceller3.reset( | 1794 private_submodules_->echo_canceller3.reset( |
1762 new EchoCanceller3(proc_sample_rate_hz(), true)); | 1795 new EchoCanceller3(proc_sample_rate_hz(), true)); |
1763 } else { | 1796 } else { |
1764 private_submodules_->echo_canceller3.reset(); | 1797 private_submodules_->echo_canceller3.reset(); |
1765 } | 1798 } |
1766 } | 1799 } |
1767 | 1800 |
| 1801 void AudioProcessingImpl::InitializeGainController2() { |
| 1802 if (capture_nonlocked_.gain_controller2_enabled) { |
| 1803 private_submodules_->gain_controller2.reset( |
| 1804 new GainController2(proc_sample_rate_hz())); |
| 1805 } else { |
| 1806 private_submodules_->gain_controller2.reset(); |
| 1807 } |
| 1808 } |
| 1809 |
1768 void AudioProcessingImpl::InitializeLevelController() { | 1810 void AudioProcessingImpl::InitializeLevelController() { |
1769 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); | 1811 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); |
1770 } | 1812 } |
1771 | 1813 |
1772 void AudioProcessingImpl::InitializeResidualEchoDetector() { | 1814 void AudioProcessingImpl::InitializeResidualEchoDetector() { |
1773 private_submodules_->residual_echo_detector->Initialize(); | 1815 private_submodules_->residual_echo_detector->Initialize(); |
1774 } | 1816 } |
1775 | 1817 |
1776 void AudioProcessingImpl::MaybeUpdateHistograms() { | 1818 void AudioProcessingImpl::MaybeUpdateHistograms() { |
1777 static const int kMinDiffDelayMs = 60; | 1819 static const int kMinDiffDelayMs = 60; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 previous_agc_level(0), | 2054 previous_agc_level(0), |
2013 echo_path_gain_change(false) {} | 2055 echo_path_gain_change(false) {} |
2014 | 2056 |
2015 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 2057 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
2016 | 2058 |
2017 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 2059 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
2018 | 2060 |
2019 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 2061 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
2020 | 2062 |
2021 } // namespace webrtc | 2063 } // namespace webrtc |
OLD | NEW |