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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
865 config.Set<webrtc::Intelligibility>( | 865 config.Set<webrtc::Intelligibility>( |
866 new webrtc::Intelligibility(*intelligibility_enhancer_)); | 866 new webrtc::Intelligibility(*intelligibility_enhancer_)); |
867 } | 867 } |
868 | 868 |
869 if (options.level_control) { | 869 if (options.level_control) { |
870 level_control_ = options.level_control; | 870 level_control_ = options.level_control; |
871 } | 871 } |
872 | 872 |
873 LOG(LS_INFO) << "Level control: " | 873 LOG(LS_INFO) << "Level control: " |
874 << (!!level_control_ ? *level_control_ : -1); | 874 << (!!level_control_ ? *level_control_ : -1); |
875 webrtc::AudioProcessing::Config apm_config; | |
875 if (level_control_) { | 876 if (level_control_) { |
876 config.Set<webrtc::LevelControl>(new webrtc::LevelControl(*level_control_)); | 877 apm_config.level_controller.enabled = *level_control_; |
877 } | 878 } |
878 | 879 |
879 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine | 880 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine |
880 // returns NULL on audio_processing(). | 881 // returns NULL on audio_processing(). |
881 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); | 882 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); |
882 if (audioproc) { | 883 if (audioproc) { |
883 audioproc->SetExtraOptions(config); | 884 audioproc->SetExtraOptions(config); |
884 } | 885 } |
885 | 886 |
887 RTC_DCHECK(apm_config.Validate()); | |
888 voe_wrapper_->base()->audio_processing()->ApplyConfig(apm_config); | |
the sun
2016/08/30 18:05:35
It looks to me, reading the comment above, that th
peah-webrtc
2016/08/31 08:08:31
Great point!
Done.
| |
889 | |
886 if (options.recording_sample_rate) { | 890 if (options.recording_sample_rate) { |
887 LOG(LS_INFO) << "Recording sample rate is " | 891 LOG(LS_INFO) << "Recording sample rate is " |
888 << *options.recording_sample_rate; | 892 << *options.recording_sample_rate; |
889 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { | 893 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { |
890 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); | 894 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); |
891 } | 895 } |
892 } | 896 } |
893 | 897 |
894 if (options.playout_sample_rate) { | 898 if (options.playout_sample_rate) { |
895 LOG(LS_INFO) << "Playout sample rate is " << *options.playout_sample_rate; | 899 LOG(LS_INFO) << "Playout sample rate is " << *options.playout_sample_rate; |
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2663 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2667 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2664 const auto it = send_streams_.find(ssrc); | 2668 const auto it = send_streams_.find(ssrc); |
2665 if (it != send_streams_.end()) { | 2669 if (it != send_streams_.end()) { |
2666 return it->second->channel(); | 2670 return it->second->channel(); |
2667 } | 2671 } |
2668 return -1; | 2672 return -1; |
2669 } | 2673 } |
2670 } // namespace cricket | 2674 } // namespace cricket |
2671 | 2675 |
2672 #endif // HAVE_WEBRTC_VOICE | 2676 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |