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

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

Issue 1913603002: Compensate for the compression gain in the IntelligibilityEnhancer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate( 709 public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate(
710 public_submodules_->noise_suppression->NoiseEstimate()); 710 public_submodules_->noise_suppression->NoiseEstimate(),
711 public_submodules_->gain_control->compression_gain_db());
peah-webrtc 2016/04/25 07:23:20 Is there some action in place to ensure that the A
aluebs-webrtc 2016/04/27 22:52:58 Good point. Done.
711 } 712 }
712 713
713 // Ensure that the stream delay was set before the call to the 714 // Ensure that the stream delay was set before the call to the
714 // AECM ProcessCaptureAudio function. 715 // AECM ProcessCaptureAudio function.
715 if (public_submodules_->echo_control_mobile->is_enabled() && 716 if (public_submodules_->echo_control_mobile->is_enabled() &&
716 !was_stream_delay_set()) { 717 !was_stream_delay_set()) {
717 return AudioProcessing::kStreamParameterNotSetError; 718 return AudioProcessing::kStreamParameterNotSetError;
718 } 719 }
719 720
720 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio( 721 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessCaptureAudio(
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); 1460 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config);
1460 1461
1461 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), 1462 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(),
1462 &debug_dump_.num_bytes_left_for_log_, 1463 &debug_dump_.num_bytes_left_for_log_,
1463 &crit_debug_, &debug_dump_.capture)); 1464 &crit_debug_, &debug_dump_.capture));
1464 return kNoError; 1465 return kNoError;
1465 } 1466 }
1466 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP 1467 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
1467 1468
1468 } // namespace webrtc 1469 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698