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

Side by Side Diff: content/renderer/media/media_stream_audio_processor.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, 11 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 | « no previous file | content/renderer/media/media_stream_audio_processor_options.cc » ('j') | 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.h" 5 #include "content/renderer/media/media_stream_audio_processor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 bool isDelayAgnosticAecEnabled() { 80 bool isDelayAgnosticAecEnabled() {
81 // Note: It's important to query the field trial state first, to ensure that 81 // Note: It's important to query the field trial state first, to ensure that
82 // UMA reports the correct group. 82 // UMA reports the correct group.
83 const std::string group_name = 83 const std::string group_name =
84 base::FieldTrialList::FindFullName("UseDelayAgnosticAEC"); 84 base::FieldTrialList::FindFullName("UseDelayAgnosticAEC");
85 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 85 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
86 if (command_line->HasSwitch(switches::kEnableDelayAgnosticAec)) 86 if (command_line->HasSwitch(switches::kEnableDelayAgnosticAec))
87 return true; 87 return true;
88 88
89 return group_name == "Enabled"; 89 return (group_name == "Enabled" || group_name == "DefaultEnabled");
90 } 90 }
91 } // namespace 91 } // namespace
92 92
93 // Wraps AudioBus to provide access to the array of channel pointers, since this 93 // Wraps AudioBus to provide access to the array of channel pointers, since this
94 // is the type webrtc::AudioProcessing deals in. The array is refreshed on every 94 // is the type webrtc::AudioProcessing deals in. The array is refreshed on every
95 // channel_ptrs() call, and will be valid until the underlying AudioBus pointers 95 // channel_ptrs() call, and will be valid until the underlying AudioBus pointers
96 // are changed, e.g. through calls to SetChannelData() or SwapChannels(). 96 // are changed, e.g. through calls to SetChannelData() or SwapChannels().
97 // 97 //
98 // All methods are called on one of the capture or render audio threads 98 // All methods are called on one of the capture or render audio threads
99 // exclusively. 99 // exclusively.
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 vad->stream_has_voice()); 679 vad->stream_has_voice());
680 base::subtle::Release_Store(&typing_detected_, detected); 680 base::subtle::Release_Store(&typing_detected_, detected);
681 } 681 }
682 682
683 // Return 0 if the volume hasn't been changed, and otherwise the new volume. 683 // Return 0 if the volume hasn't been changed, and otherwise the new volume.
684 return (agc->stream_analog_level() == volume) ? 684 return (agc->stream_analog_level() == volume) ?
685 0 : agc->stream_analog_level(); 685 0 : agc->stream_analog_level();
686 } 686 }
687 687
688 } // namespace content 688 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698