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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 LOG(LS_INFO) << "Intelligibility Enhancer is enabled? " | 594 LOG(LS_INFO) << "Intelligibility Enhancer is enabled? " |
595 << *intelligibility_enhancer_; | 595 << *intelligibility_enhancer_; |
596 config.Set<webrtc::Intelligibility>( | 596 config.Set<webrtc::Intelligibility>( |
597 new webrtc::Intelligibility(*intelligibility_enhancer_)); | 597 new webrtc::Intelligibility(*intelligibility_enhancer_)); |
598 } | 598 } |
599 | 599 |
600 if (options.level_control) { | 600 if (options.level_control) { |
601 level_control_ = options.level_control; | 601 level_control_ = options.level_control; |
602 } | 602 } |
603 | 603 |
| 604 webrtc::AudioProcessing::Config apm_config = apm()->GetConfig(); |
| 605 |
604 LOG(LS_INFO) << "Level control: " | 606 LOG(LS_INFO) << "Level control: " |
605 << (!!level_control_ ? *level_control_ : -1); | 607 << (!!level_control_ ? *level_control_ : -1); |
606 if (level_control_) { | 608 if (level_control_) { |
607 apm_config_.level_controller.enabled = *level_control_; | 609 apm_config.level_controller.enabled = *level_control_; |
608 if (options.level_control_initial_peak_level_dbfs) { | 610 if (options.level_control_initial_peak_level_dbfs) { |
609 apm_config_.level_controller.initial_peak_level_dbfs = | 611 apm_config.level_controller.initial_peak_level_dbfs = |
610 *options.level_control_initial_peak_level_dbfs; | 612 *options.level_control_initial_peak_level_dbfs; |
611 } | 613 } |
612 } | 614 } |
613 | 615 |
614 if (options.highpass_filter) { | 616 if (options.highpass_filter) { |
615 apm_config_.high_pass_filter.enabled = *options.highpass_filter; | 617 apm_config.high_pass_filter.enabled = *options.highpass_filter; |
616 } | 618 } |
617 | 619 |
618 if (options.residual_echo_detector) { | 620 if (options.residual_echo_detector) { |
619 apm_config_.residual_echo_detector.enabled = | 621 apm_config.residual_echo_detector.enabled = *options.residual_echo_detector; |
620 *options.residual_echo_detector; | |
621 } | 622 } |
622 | 623 |
623 apm()->SetExtraOptions(config); | 624 apm()->SetExtraOptions(config); |
624 apm()->ApplyConfig(apm_config_); | 625 apm()->ApplyConfig(apm_config); |
625 | 626 |
626 if (options.recording_sample_rate) { | 627 if (options.recording_sample_rate) { |
627 LOG(LS_INFO) << "Recording sample rate is " | 628 LOG(LS_INFO) << "Recording sample rate is " |
628 << *options.recording_sample_rate; | 629 << *options.recording_sample_rate; |
629 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { | 630 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { |
630 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); | 631 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); |
631 } | 632 } |
632 } | 633 } |
633 | 634 |
634 if (options.playout_sample_rate) { | 635 if (options.playout_sample_rate) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 746 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
746 return voe_wrapper_->base()->CreateChannel(channel_config_); | 747 return voe_wrapper_->base()->CreateChannel(channel_config_); |
747 } | 748 } |
748 | 749 |
749 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() { | 750 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() { |
750 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 751 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
751 RTC_DCHECK(adm_); | 752 RTC_DCHECK(adm_); |
752 return adm_; | 753 return adm_; |
753 } | 754 } |
754 | 755 |
755 webrtc::AudioProcessing* WebRtcVoiceEngine::apm() { | 756 webrtc::AudioProcessing* WebRtcVoiceEngine::apm() const { |
756 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 757 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
757 return apm_.get(); | 758 return apm_.get(); |
758 } | 759 } |
759 | 760 |
760 webrtc::voe::TransmitMixer* WebRtcVoiceEngine::transmit_mixer() { | 761 webrtc::voe::TransmitMixer* WebRtcVoiceEngine::transmit_mixer() { |
761 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 762 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
762 RTC_DCHECK(transmit_mixer_); | 763 RTC_DCHECK(transmit_mixer_); |
763 return transmit_mixer_; | 764 return transmit_mixer_; |
764 } | 765 } |
765 | 766 |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 ssrc); | 2373 ssrc); |
2373 if (it != unsignaled_recv_ssrcs_.end()) { | 2374 if (it != unsignaled_recv_ssrcs_.end()) { |
2374 unsignaled_recv_ssrcs_.erase(it); | 2375 unsignaled_recv_ssrcs_.erase(it); |
2375 return true; | 2376 return true; |
2376 } | 2377 } |
2377 return false; | 2378 return false; |
2378 } | 2379 } |
2379 } // namespace cricket | 2380 } // namespace cricket |
2380 | 2381 |
2381 #endif // HAVE_WEBRTC_VOICE | 2382 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |