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