Index: content/renderer/media/media_stream_audio_processor_options.cc |
diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc |
index cffc5a17e2c699d84fdb76e18b42036660bfed7a..51f52abb132187e37c84e62bec800123227ab220 100644 |
--- a/content/renderer/media/media_stream_audio_processor_options.cc |
+++ b/content/renderer/media/media_stream_audio_processor_options.cc |
@@ -39,10 +39,8 @@ struct { |
webrtc::MediaConstraintsInterface::kValueTrue }, |
{ webrtc::MediaConstraintsInterface::kHighpassFilter, |
webrtc::MediaConstraintsInterface::kValueTrue }, |
- // TODO(xians): Verify if it is OK to set typing detection to kValueFalse as |
- // default. |
{ webrtc::MediaConstraintsInterface::kTypingNoiseDetection, |
- webrtc::MediaConstraintsInterface::kValueFalse }, |
+ webrtc::MediaConstraintsInterface::kValueTrue }, |
}; |
} // namespace |
@@ -122,7 +120,6 @@ void EnableHighPassFilter(AudioProcessing* audio_processing) { |
CHECK_EQ(audio_processing->high_pass_filter()->Enable(true), 0); |
} |
-// TODO(xians): stereo swapping |
void EnableTypingDetection(AudioProcessing* audio_processing) { |
int err = audio_processing->voice_detection()->Enable(true); |
err |= audio_processing->voice_detection()->set_likelihood( |
@@ -163,4 +160,15 @@ void StopAecDump(AudioProcessing* audio_processing) { |
DLOG(ERROR) << "Fail to stop AEC debug recording"; |
} |
+void EnableAutomaticGainControl(AudioProcessing* audio_processing) { |
+#if defined(OS_ANDROID) || defined(OS_IOS) |
+ const webrtc::GainControl::Mode mode = webrtc::GainControl::kAdaptiveAnalog; |
+#else |
+ const webrtc::GainControl::Mode mode = webrtc::GainControl::kAdaptiveAnalog; |
+#endif |
+ int err = audio_processing->gain_control()->set_mode(mode); |
+ err |= audio_processing->gain_control()->Enable(true); |
+ CHECK_EQ(err, 0); |
+} |
+ |
} // namespace content |