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) { |