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

Unified Diff: trunk/src/content/renderer/media/media_stream_audio_processor_options.cc

Issue 146923002: Revert 246894 "Wire up AGC to the MediaStreamAudioProcessor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/renderer/media/media_stream_audio_processor_options.cc
===================================================================
--- trunk/src/content/renderer/media/media_stream_audio_processor_options.cc (revision 246904)
+++ trunk/src/content/renderer/media/media_stream_audio_processor_options.cc (working copy)
@@ -39,8 +39,10 @@
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::kValueTrue },
+ webrtc::MediaConstraintsInterface::kValueFalse },
};
} // namespace
@@ -88,20 +90,23 @@
}
void EnableEchoCancellation(AudioProcessing* audio_processing) {
-#if defined(OS_ANDROID)
+#if defined(OS_IOS)
+ // On iOS, VPIO provides built-in EC and AGC.
+ return;
+#elif defined(OS_ANDROID)
// Mobile devices are using AECM.
- int err = audio_processing->echo_control_mobile()->set_routing_mode(
+ int err = audio_processing->echo_control_mobile()->Enable(true);
+ err |= audio_processing->echo_control_mobile()->set_routing_mode(
webrtc::EchoControlMobile::kSpeakerphone);
- err |= audio_processing->echo_control_mobile()->Enable(true);
CHECK_EQ(err, 0);
#else
- int err = audio_processing->echo_cancellation()->set_suppression_level(
+ int err = audio_processing->echo_cancellation()->Enable(true);
+ err |= audio_processing->echo_cancellation()->set_suppression_level(
webrtc::EchoCancellation::kHighSuppression);
// Enable the metrics for AEC.
err |= audio_processing->echo_cancellation()->enable_metrics(true);
err |= audio_processing->echo_cancellation()->enable_delay_logging(true);
- err |= audio_processing->echo_cancellation()->Enable(true);
CHECK_EQ(err, 0);
#endif
}
@@ -117,6 +122,7 @@
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(
@@ -157,15 +163,4 @@
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::kFixedDigital;
-#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

Powered by Google App Engine
This is Rietveld 408576698