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); |
885 RTC_DCHECK(apm_config.Validate()); | |
the sun
2016/09/01 13:48:00
ApplyConfig already returns a bool - use that inst
peah-webrtc
2016/09/02 08:21:59
I don't think that this mandates a CHECK, so I do
| |
886 audioproc->ApplyConfig(apm_config); | |
884 } | 887 } |
885 | 888 |
886 if (options.recording_sample_rate) { | 889 if (options.recording_sample_rate) { |
887 LOG(LS_INFO) << "Recording sample rate is " | 890 LOG(LS_INFO) << "Recording sample rate is " |
888 << *options.recording_sample_rate; | 891 << *options.recording_sample_rate; |
889 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { | 892 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { |
890 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); | 893 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); |
891 } | 894 } |
892 } | 895 } |
893 | 896 |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2663 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2666 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2664 const auto it = send_streams_.find(ssrc); | 2667 const auto it = send_streams_.find(ssrc); |
2665 if (it != send_streams_.end()) { | 2668 if (it != send_streams_.end()) { |
2666 return it->second->channel(); | 2669 return it->second->channel(); |
2667 } | 2670 } |
2668 return -1; | 2671 return -1; |
2669 } | 2672 } |
2670 } // namespace cricket | 2673 } // namespace cricket |
2671 | 2674 |
2672 #endif // HAVE_WEBRTC_VOICE | 2675 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |