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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 config.Set<webrtc::Intelligibility>( | 861 config.Set<webrtc::Intelligibility>( |
862 new webrtc::Intelligibility(*intelligibility_enhancer_)); | 862 new webrtc::Intelligibility(*intelligibility_enhancer_)); |
863 } | 863 } |
864 | 864 |
865 if (options.level_control) { | 865 if (options.level_control) { |
866 level_control_ = options.level_control; | 866 level_control_ = options.level_control; |
867 } | 867 } |
868 | 868 |
869 LOG(LS_INFO) << "Level control: " | 869 LOG(LS_INFO) << "Level control: " |
870 << (!!level_control_ ? *level_control_ : -1); | 870 << (!!level_control_ ? *level_control_ : -1); |
| 871 webrtc::AudioProcessing::Config apm_config; |
871 if (level_control_) { | 872 if (level_control_) { |
872 config.Set<webrtc::LevelControl>(new webrtc::LevelControl(*level_control_)); | 873 apm_config.level_controller.enabled = *level_control_; |
873 } | 874 } |
874 | 875 |
875 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine | 876 // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine |
876 // returns NULL on audio_processing(). | 877 // returns NULL on audio_processing(). |
877 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); | 878 webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); |
878 if (audioproc) { | 879 if (audioproc) { |
879 audioproc->SetExtraOptions(config); | 880 audioproc->SetExtraOptions(config); |
| 881 audioproc->ApplyConfig(apm_config); |
880 } | 882 } |
881 | 883 |
882 if (options.recording_sample_rate) { | 884 if (options.recording_sample_rate) { |
883 LOG(LS_INFO) << "Recording sample rate is " | 885 LOG(LS_INFO) << "Recording sample rate is " |
884 << *options.recording_sample_rate; | 886 << *options.recording_sample_rate; |
885 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { | 887 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { |
886 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); | 888 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); |
887 } | 889 } |
888 } | 890 } |
889 | 891 |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2661 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2660 const auto it = send_streams_.find(ssrc); | 2662 const auto it = send_streams_.find(ssrc); |
2661 if (it != send_streams_.end()) { | 2663 if (it != send_streams_.end()) { |
2662 return it->second->channel(); | 2664 return it->second->channel(); |
2663 } | 2665 } |
2664 return -1; | 2666 return -1; |
2665 } | 2667 } |
2666 } // namespace cricket | 2668 } // namespace cricket |
2667 | 2669 |
2668 #endif // HAVE_WEBRTC_VOICE | 2670 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |