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

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: nit 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') | media/audio/audio_input_controller.cc » ('J')
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..62c1e4268b460f52e8a10975180df69520166c95 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,21 @@ 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.
+ // Set the initial AGC state for the audio input stream. Note that, the AGC
+ // is only supported in AUDIO_PCM_LOW_LATENCY mode.
+ const bool agc_is_enabled =
+ config.params.format() ==
+ media::AudioParameters::AUDIO_PCM_LOW_LATENCY &&
tommi (sloooow) - chröme 2014/10/20 16:03:28 if format() is not 'low latency' bug we call Creat
henrika (OOO until Aug 14) 2014/10/21 08:00:28 Good point. I had the same idea but did not want t
+ config.automatic_gain_control;
+ oss << ", AGC=" << agc_is_enabled;
entry->controller =
media::AudioInputController::CreateLowLatency(audio_manager_,
this,
audio_params,
device_id,
entry->writer.get(),
- user_input_monitor_);
+ user_input_monitor_,
+ agc_is_enabled);
}
if (!entry->controller.get()) {
@@ -407,13 +412,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') | media/audio/audio_input_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698