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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 663123002: Reduce power logging and UMA stats when AGC is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/audio_input_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 83aa43cf4ba9322da6a754578030631b177f0d03..7b421ba6d5503cf0a1e1e38b687fd5b9c9417550 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -389,16 +389,17 @@ void AudioInputRendererHost::DoCreateStream(
entry->writer.get(),
user_input_monitor_);
} else {
- // TODO(henrika): replace CreateLowLatency() with Create() as soon
- // as satish has ensured that Speech Input also uses the default low-
- // latency path. See crbug.com/112472 for details.
- entry->controller =
- media::AudioInputController::CreateLowLatency(audio_manager_,
- this,
- audio_params,
- device_id,
- entry->writer.get(),
- user_input_monitor_);
+ DCHECK_EQ(config.params.format(),
+ media::AudioParameters::AUDIO_PCM_LOW_LATENCY);
+ entry->controller = media::AudioInputController::CreateLowLatency(
+ audio_manager_,
+ this,
+ audio_params,
+ device_id,
+ entry->writer.get(),
+ user_input_monitor_,
+ config.automatic_gain_control);
+ oss << ", AGC=" << config.automatic_gain_control;
}
if (!entry->controller.get()) {
@@ -407,13 +408,6 @@ void AudioInputRendererHost::DoCreateStream(
return;
}
- // Set the initial AGC state for the audio input stream. Note that, the AGC
- // is only supported in AUDIO_PCM_LOW_LATENCY mode.
- if (config.params.format() == media::AudioParameters::AUDIO_PCM_LOW_LATENCY) {
- entry->controller->SetAutomaticGainControl(config.automatic_gain_control);
- oss << ", AGC=" << config.automatic_gain_control;
- }
-
#if defined(OS_CHROMEOS)
if (config.params.channel_layout() ==
media::CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC) {
« no previous file with comments | « no previous file | media/audio/audio_input_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698