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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2272423003: Deactivated the intelligibility enhancement functionality by default (Closed)
Patch Set: Changed name of build file flags Created 4 years, 3 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 | « webrtc/media/BUILD.gn ('k') | webrtc/media/media.gyp » ('j') | 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // On Windows systems which only support Wave Audio style default, uses either 57 // On Windows systems which only support Wave Audio style default, uses either
58 // -1 or 0 to select the default device. 58 // -1 or 0 to select the default device.
59 #ifdef WIN32 59 #ifdef WIN32
60 const int kDefaultAudioDeviceId = -1; 60 const int kDefaultAudioDeviceId = -1;
61 #elif !defined(WEBRTC_IOS) 61 #elif !defined(WEBRTC_IOS)
62 const int kDefaultAudioDeviceId = 0; 62 const int kDefaultAudioDeviceId = 0;
63 #endif 63 #endif
64 64
65 constexpr int kNackRtpHistoryMs = 5000; 65 constexpr int kNackRtpHistoryMs = 5000;
66 66
67 // Check to verify that the define for the intelligibility enhancer is properly
68 // set.
69 #if !defined(WEBRTC_INTELLIGIBILITY_ENHANCER) || \
70 (WEBRTC_INTELLIGIBILITY_ENHANCER != 0 && \
71 WEBRTC_INTELLIGIBILITY_ENHANCER != 1)
72 #error "Set WEBRTC_INTELLIGIBILITY_ENHANCER to either 0 or 1"
73 #endif
74
67 // Codec parameters for Opus. 75 // Codec parameters for Opus.
68 // draft-spittka-payload-rtp-opus-03 76 // draft-spittka-payload-rtp-opus-03
69 77
70 // Recommended bitrates: 78 // Recommended bitrates:
71 // 8-12 kb/s for NB speech, 79 // 8-12 kb/s for NB speech,
72 // 16-20 kb/s for WB speech, 80 // 16-20 kb/s for WB speech,
73 // 28-40 kb/s for FB speech, 81 // 28-40 kb/s for FB speech,
74 // 48-64 kb/s for FB mono music, and 82 // 48-64 kb/s for FB mono music, and
75 // 64-128 kb/s for FB stereo music. 83 // 64-128 kb/s for FB stereo music.
76 // The current implementation applies the following values to mono signals, 84 // The current implementation applies the following values to mono signals,
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 if (options.delay_agnostic_aec) { 650 if (options.delay_agnostic_aec) {
643 use_delay_agnostic_aec = *options.delay_agnostic_aec; 651 use_delay_agnostic_aec = *options.delay_agnostic_aec;
644 if (use_delay_agnostic_aec) { 652 if (use_delay_agnostic_aec) {
645 options.echo_cancellation = rtc::Optional<bool>(true); 653 options.echo_cancellation = rtc::Optional<bool>(true);
646 options.extended_filter_aec = rtc::Optional<bool>(true); 654 options.extended_filter_aec = rtc::Optional<bool>(true);
647 ec_mode = webrtc::kEcConference; 655 ec_mode = webrtc::kEcConference;
648 } 656 }
649 } 657 }
650 #endif 658 #endif
651 659
660 #if (WEBRTC_INTELLIGIBILITY_ENHANCER == 0)
661 // Hardcode the intelligibility enhancer to be off.
662 options.intelligibility_enhancer = rtc::Optional<bool>(false);
663 #endif
664
652 webrtc::VoEAudioProcessing* voep = voe_wrapper_->processing(); 665 webrtc::VoEAudioProcessing* voep = voe_wrapper_->processing();
653 666
654 if (options.echo_cancellation) { 667 if (options.echo_cancellation) {
655 // Check if platform supports built-in EC. Currently only supported on 668 // Check if platform supports built-in EC. Currently only supported on
656 // Android and in combination with Java based audio layer. 669 // Android and in combination with Java based audio layer.
657 // TODO(henrika): investigate possibility to support built-in EC also 670 // TODO(henrika): investigate possibility to support built-in EC also
658 // in combination with Open SL ES audio. 671 // in combination with Open SL ES audio.
659 const bool built_in_aec = adm()->BuiltInAECIsAvailable(); 672 const bool built_in_aec = adm()->BuiltInAECIsAvailable();
660 if (built_in_aec) { 673 if (built_in_aec) {
661 // Built-in EC exists on this device and use_delay_agnostic_aec is not 674 // Built-in EC exists on this device and use_delay_agnostic_aec is not
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2663 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2651 const auto it = send_streams_.find(ssrc); 2664 const auto it = send_streams_.find(ssrc);
2652 if (it != send_streams_.end()) { 2665 if (it != send_streams_.end()) {
2653 return it->second->channel(); 2666 return it->second->channel();
2654 } 2667 }
2655 return -1; 2668 return -1;
2656 } 2669 }
2657 } // namespace cricket 2670 } // namespace cricket
2658 2671
2659 #endif // HAVE_WEBRTC_VOICE 2672 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/BUILD.gn ('k') | webrtc/media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698