Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2489343002: Corrected the way that the settings for the new APM parameter scheme are applied in VoiceEngine (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 config.Set<webrtc::Intelligibility>( 905 config.Set<webrtc::Intelligibility>(
906 new webrtc::Intelligibility(*intelligibility_enhancer_)); 906 new webrtc::Intelligibility(*intelligibility_enhancer_));
907 } 907 }
908 908
909 if (options.level_control) { 909 if (options.level_control) {
910 level_control_ = options.level_control; 910 level_control_ = options.level_control;
911 } 911 }
912 912
913 LOG(LS_INFO) << "Level control: " 913 LOG(LS_INFO) << "Level control: "
914 << (!!level_control_ ? *level_control_ : -1); 914 << (!!level_control_ ? *level_control_ : -1);
915 webrtc::AudioProcessing::Config apm_config;
916 if (level_control_) { 915 if (level_control_) {
917 apm_config.level_controller.enabled = *level_control_; 916 apm_config_.level_controller.enabled = *level_control_;
918 if (options.level_control_initial_peak_level_dbfs) { 917 if (options.level_control_initial_peak_level_dbfs) {
919 apm_config.level_controller.initial_peak_level_dbfs = 918 apm_config_.level_controller.initial_peak_level_dbfs =
920 *options.level_control_initial_peak_level_dbfs; 919 *options.level_control_initial_peak_level_dbfs;
921 } 920 }
922 } 921 }
923 922
924 apm()->SetExtraOptions(config); 923 apm()->SetExtraOptions(config);
925 apm()->ApplyConfig(apm_config); 924 apm()->ApplyConfig(apm_config_);
926 925
927 if (options.recording_sample_rate) { 926 if (options.recording_sample_rate) {
928 LOG(LS_INFO) << "Recording sample rate is " 927 LOG(LS_INFO) << "Recording sample rate is "
929 << *options.recording_sample_rate; 928 << *options.recording_sample_rate;
930 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { 929 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) {
931 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); 930 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate);
932 } 931 }
933 } 932 }
934 933
935 if (options.playout_sample_rate) { 934 if (options.playout_sample_rate) {
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2643 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2642 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2644 const auto it = send_streams_.find(ssrc); 2643 const auto it = send_streams_.find(ssrc);
2645 if (it != send_streams_.end()) { 2644 if (it != send_streams_.end()) {
2646 return it->second->channel(); 2645 return it->second->channel();
2647 } 2646 }
2648 return -1; 2647 return -1;
2649 } 2648 }
2650 } // namespace cricket 2649 } // namespace cricket
2651 2650
2652 #endif // HAVE_WEBRTC_VOICE 2651 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698