OLD | NEW |
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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50); | 599 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50); |
600 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false); | 600 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false); |
601 options.typing_detection = rtc::Optional<bool>(true); | 601 options.typing_detection = rtc::Optional<bool>(true); |
602 options.adjust_agc_delta = rtc::Optional<int>(0); | 602 options.adjust_agc_delta = rtc::Optional<int>(0); |
603 options.experimental_agc = rtc::Optional<bool>(false); | 603 options.experimental_agc = rtc::Optional<bool>(false); |
604 options.extended_filter_aec = rtc::Optional<bool>(false); | 604 options.extended_filter_aec = rtc::Optional<bool>(false); |
605 options.delay_agnostic_aec = rtc::Optional<bool>(false); | 605 options.delay_agnostic_aec = rtc::Optional<bool>(false); |
606 options.experimental_ns = rtc::Optional<bool>(false); | 606 options.experimental_ns = rtc::Optional<bool>(false); |
607 options.intelligibility_enhancer = rtc::Optional<bool>(false); | 607 options.intelligibility_enhancer = rtc::Optional<bool>(false); |
608 options.level_control = rtc::Optional<bool>(false); | 608 options.level_control = rtc::Optional<bool>(false); |
| 609 // TODO(ivoc): Always enable residual echo detector after benchmarking on |
| 610 // mobile. |
| 611 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
| 612 options.residual_echo_detector = rtc::Optional<bool>(false); |
| 613 #else |
| 614 options.residual_echo_detector = rtc::Optional<bool>(true); |
| 615 #endif |
609 bool error = ApplyOptions(options); | 616 bool error = ApplyOptions(options); |
610 RTC_DCHECK(error); | 617 RTC_DCHECK(error); |
611 } | 618 } |
612 | 619 |
613 SetDefaultDevices(); | 620 SetDefaultDevices(); |
614 } | 621 } |
615 | 622 |
616 WebRtcVoiceEngine::~WebRtcVoiceEngine() { | 623 WebRtcVoiceEngine::~WebRtcVoiceEngine() { |
617 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 624 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
618 LOG(LS_INFO) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; | 625 LOG(LS_INFO) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 #endif | 670 #endif |
664 | 671 |
665 #if defined(WEBRTC_IOS) || defined(ANDROID) | 672 #if defined(WEBRTC_IOS) || defined(ANDROID) |
666 // Set the AGC mode for iOS as well despite disabling it above, to avoid | 673 // Set the AGC mode for iOS as well despite disabling it above, to avoid |
667 // unsupported configuration errors from webrtc. | 674 // unsupported configuration errors from webrtc. |
668 agc_mode = webrtc::kAgcFixedDigital; | 675 agc_mode = webrtc::kAgcFixedDigital; |
669 options.typing_detection = rtc::Optional<bool>(false); | 676 options.typing_detection = rtc::Optional<bool>(false); |
670 options.experimental_agc = rtc::Optional<bool>(false); | 677 options.experimental_agc = rtc::Optional<bool>(false); |
671 options.extended_filter_aec = rtc::Optional<bool>(false); | 678 options.extended_filter_aec = rtc::Optional<bool>(false); |
672 options.experimental_ns = rtc::Optional<bool>(false); | 679 options.experimental_ns = rtc::Optional<bool>(false); |
| 680 options.residual_echo_detector = rtc::Optional<bool>(false); |
673 #endif | 681 #endif |
674 | 682 |
675 // Delay Agnostic AEC automatically turns on EC if not set except on iOS | 683 // Delay Agnostic AEC automatically turns on EC if not set except on iOS |
676 // where the feature is not supported. | 684 // where the feature is not supported. |
677 bool use_delay_agnostic_aec = false; | 685 bool use_delay_agnostic_aec = false; |
678 #if !defined(WEBRTC_IOS) | 686 #if !defined(WEBRTC_IOS) |
679 if (options.delay_agnostic_aec) { | 687 if (options.delay_agnostic_aec) { |
680 use_delay_agnostic_aec = *options.delay_agnostic_aec; | 688 use_delay_agnostic_aec = *options.delay_agnostic_aec; |
681 if (use_delay_agnostic_aec) { | 689 if (use_delay_agnostic_aec) { |
682 options.echo_cancellation = rtc::Optional<bool>(true); | 690 options.echo_cancellation = rtc::Optional<bool>(true); |
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2587 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2580 const auto it = send_streams_.find(ssrc); | 2588 const auto it = send_streams_.find(ssrc); |
2581 if (it != send_streams_.end()) { | 2589 if (it != send_streams_.end()) { |
2582 return it->second->channel(); | 2590 return it->second->channel(); |
2583 } | 2591 } |
2584 return -1; | 2592 return -1; |
2585 } | 2593 } |
2586 } // namespace cricket | 2594 } // namespace cricket |
2587 | 2595 |
2588 #endif // HAVE_WEBRTC_VOICE | 2596 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |