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

Side by Side Diff: content/renderer/media/media_stream_audio_processor_options.cc

Issue 879523003: media_stream_audio_processor: Default enabled Finch experiments now also applies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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 | « content/renderer/media/media_stream_audio_processor.cc ('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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_audio_processor_options.h" 5 #include "content/renderer/media/media_stream_audio_processor_options.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 echo_poor_delay_counts_ = 0; 260 echo_poor_delay_counts_ = 0;
261 echo_total_delay_counts_ = 0; 261 echo_total_delay_counts_ = 0;
262 last_log_time_ = base::TimeTicks::Now(); 262 last_log_time_ = base::TimeTicks::Now();
263 } 263 }
264 264
265 void EnableEchoCancellation(AudioProcessing* audio_processing) { 265 void EnableEchoCancellation(AudioProcessing* audio_processing) {
266 #if defined(OS_ANDROID) || defined(OS_IOS) 266 #if defined(OS_ANDROID) || defined(OS_IOS)
267 const std::string group_name = 267 const std::string group_name =
268 base::FieldTrialList::FindFullName("ReplaceAECMWithAEC"); 268 base::FieldTrialList::FindFullName("ReplaceAECMWithAEC");
269 if (group_name.empty() || group_name != "Enabled") { 269 if (group_name.empty() ||
270 !(group_name == "Enabled" || group_name == "DefaultEnabled")) {
270 // Mobile devices are using AECM. 271 // Mobile devices are using AECM.
271 int err = audio_processing->echo_control_mobile()->set_routing_mode( 272 int err = audio_processing->echo_control_mobile()->set_routing_mode(
272 webrtc::EchoControlMobile::kSpeakerphone); 273 webrtc::EchoControlMobile::kSpeakerphone);
273 err |= audio_processing->echo_control_mobile()->Enable(true); 274 err |= audio_processing->echo_control_mobile()->Enable(true);
274 CHECK_EQ(err, 0); 275 CHECK_EQ(err, 0);
275 return; 276 return;
276 } 277 }
277 #endif 278 #endif
278 int err = audio_processing->echo_cancellation()->set_suppression_level( 279 int err = audio_processing->echo_cancellation()->set_suppression_level(
279 webrtc::EchoCancellation::kHighSuppression); 280 webrtc::EchoCancellation::kHighSuppression);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 371 }
371 372
372 int median = 0, std = 0; 373 int median = 0, std = 0;
373 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) { 374 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) {
374 stats->echo_delay_median_ms = median; 375 stats->echo_delay_median_ms = median;
375 stats->echo_delay_std_ms = std; 376 stats->echo_delay_std_ms = std;
376 } 377 }
377 } 378 }
378 379
379 } // namespace content 380 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698