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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio( | 699 RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio( |
700 ca, stream_delay_ms())); | 700 ca, stream_delay_ms())); |
701 | 701 |
702 if (public_submodules_->echo_control_mobile->is_enabled() && | 702 if (public_submodules_->echo_control_mobile->is_enabled() && |
703 public_submodules_->noise_suppression->is_enabled()) { | 703 public_submodules_->noise_suppression->is_enabled()) { |
704 ca->CopyLowPassToReference(); | 704 ca->CopyLowPassToReference(); |
705 } | 705 } |
706 public_submodules_->noise_suppression->ProcessCaptureAudio(ca); | 706 public_submodules_->noise_suppression->ProcessCaptureAudio(ca); |
707 if (constants_.intelligibility_enabled) { | 707 if (constants_.intelligibility_enabled) { |
708 RTC_DCHECK(public_submodules_->noise_suppression->is_enabled()); | 708 RTC_DCHECK(public_submodules_->noise_suppression->is_enabled()); |
| 709 RTC_DCHECK(public_submodules_->gain_control->is_enabled()); |
709 public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate( | 710 public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate( |
710 public_submodules_->noise_suppression->NoiseEstimate()); | 711 public_submodules_->noise_suppression->NoiseEstimate(), |
| 712 public_submodules_->gain_control->compression_gain_db()); |
711 } | 713 } |
712 | 714 |
713 // Ensure that the stream delay was set before the call to the | 715 // Ensure that the stream delay was set before the call to the |
714 // AECM ProcessCaptureAudio function. | 716 // AECM ProcessCaptureAudio function. |
715 if (public_submodules_->echo_control_mobile->is_enabled() && | 717 if (public_submodules_->echo_control_mobile->is_enabled() && |
716 !was_stream_delay_set()) { | 718 !was_stream_delay_set()) { |
717 return AudioProcessing::kStreamParameterNotSetError; | 719 return AudioProcessing::kStreamParameterNotSetError; |
718 } | 720 } |
719 | 721 |
720 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio( | 722 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio( |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1461 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
1460 | 1462 |
1461 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1463 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
1462 &debug_dump_.num_bytes_left_for_log_, | 1464 &debug_dump_.num_bytes_left_for_log_, |
1463 &crit_debug_, &debug_dump_.capture)); | 1465 &crit_debug_, &debug_dump_.capture)); |
1464 return kNoError; | 1466 return kNoError; |
1465 } | 1467 } |
1466 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1468 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1467 | 1469 |
1468 } // namespace webrtc | 1470 } // namespace webrtc |
OLD | NEW |