Chromium Code Reviews| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 options.highpass_filter = rtc::Optional<bool>(true); | 570 options.highpass_filter = rtc::Optional<bool>(true); |
| 571 options.stereo_swapping = rtc::Optional<bool>(false); | 571 options.stereo_swapping = rtc::Optional<bool>(false); |
| 572 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50); | 572 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50); |
| 573 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false); | 573 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false); |
| 574 options.typing_detection = rtc::Optional<bool>(true); | 574 options.typing_detection = rtc::Optional<bool>(true); |
| 575 options.adjust_agc_delta = rtc::Optional<int>(0); | 575 options.adjust_agc_delta = rtc::Optional<int>(0); |
| 576 options.experimental_agc = rtc::Optional<bool>(false); | 576 options.experimental_agc = rtc::Optional<bool>(false); |
| 577 options.extended_filter_aec = rtc::Optional<bool>(false); | 577 options.extended_filter_aec = rtc::Optional<bool>(false); |
| 578 options.delay_agnostic_aec = rtc::Optional<bool>(false); | 578 options.delay_agnostic_aec = rtc::Optional<bool>(false); |
| 579 options.experimental_ns = rtc::Optional<bool>(false); | 579 options.experimental_ns = rtc::Optional<bool>(false); |
| 580 options.intelligibility_enhancer = rtc::Optional<bool>(false); | |
| 580 bool error = ApplyOptions(options); | 581 bool error = ApplyOptions(options); |
| 581 RTC_DCHECK(error); | 582 RTC_DCHECK(error); |
| 582 } | 583 } |
| 583 | 584 |
| 584 SetDefaultDevices(); | 585 SetDefaultDevices(); |
| 585 } | 586 } |
| 586 | 587 |
| 587 WebRtcVoiceEngine::~WebRtcVoiceEngine() { | 588 WebRtcVoiceEngine::~WebRtcVoiceEngine() { |
| 588 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 589 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 589 LOG(LS_INFO) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; | 590 LOG(LS_INFO) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 836 | 837 |
| 837 if (options.experimental_ns) { | 838 if (options.experimental_ns) { |
| 838 experimental_ns_ = options.experimental_ns; | 839 experimental_ns_ = options.experimental_ns; |
| 839 } | 840 } |
| 840 if (experimental_ns_) { | 841 if (experimental_ns_) { |
| 841 LOG(LS_INFO) << "Experimental ns is enabled? " << *experimental_ns_; | 842 LOG(LS_INFO) << "Experimental ns is enabled? " << *experimental_ns_; |
| 842 config.Set<webrtc::ExperimentalNs>( | 843 config.Set<webrtc::ExperimentalNs>( |
| 843 new webrtc::ExperimentalNs(*experimental_ns_)); | 844 new webrtc::ExperimentalNs(*experimental_ns_)); |
| 844 } | 845 } |
| 845 | 846 |
| 847 if (options.intelligibility_enhancer) { | |
|
henrika_webrtc
2016/05/11 08:50:36
You have access to the ADM here. Why can't you use
aluebs-webrtc
2016/05/11 21:22:05
Great point! I didn't realize there was a 2 way co
| |
| 848 intelligibility_enhancer_ = options.intelligibility_enhancer; | |
| 849 } | |
| 850 if (intelligibility_enhancer_) { | |
| 851 LOG(LS_INFO) << "Intelligibility Enhancer is enabled? " | |
| 852 << *intelligibility_enhancer_; | |
| 853 config.Set<webrtc::Intelligibility>( | |
| 854 new webrtc::Intelligibility(*intelligibility_enhancer_)); | |
|
the sun
2016/05/11 11:23:41
nit: the call to
adm()->EnableBuiltInNS(false)
sho
aluebs-webrtc
2016/05/11 21:22:05
Actually I think the best thing is to do it above
| |
| 855 } | |
| 856 | |
| 846 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine | 857 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine |
| 847 // returns NULL on audio_processing(). | 858 // returns NULL on audio_processing(). |
| 848 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); | 859 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); |
| 849 if (audioproc) { | 860 if (audioproc) { |
| 850 audioproc->SetExtraOptions(config); | 861 audioproc->SetExtraOptions(config); |
| 851 } | 862 } |
| 852 | 863 |
| 853 if (options.recording_sample_rate) { | 864 if (options.recording_sample_rate) { |
| 854 LOG(LS_INFO) << "Recording sample rate is " | 865 LOG(LS_INFO) << "Recording sample rate is " |
| 855 << *options.recording_sample_rate; | 866 << *options.recording_sample_rate; |
| (...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2556 } | 2567 } |
| 2557 } else { | 2568 } else { |
| 2558 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2569 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
| 2559 engine()->voe()->base()->StopPlayout(channel); | 2570 engine()->voe()->base()->StopPlayout(channel); |
| 2560 } | 2571 } |
| 2561 return true; | 2572 return true; |
| 2562 } | 2573 } |
| 2563 } // namespace cricket | 2574 } // namespace cricket |
| 2564 | 2575 |
| 2565 #endif // HAVE_WEBRTC_VOICE | 2576 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |