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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 1148843004: Reduce NS aggressiveness when beamforming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove samus. Created 5 years, 7 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: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index b4638d67b7f1a3068f88753f871a4172a75669fb..9b167a40b9098b53b52992ade2b0283be4245812 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -29,6 +29,7 @@ namespace content {
namespace {
using webrtc::AudioProcessing;
+using webrtc::NoiseSuppression;
const int kAudioProcessingNumberOfChannels = 1;
@@ -513,8 +514,15 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
echo_information_.reset(new EchoInformation());
}
- if (goog_ns)
- EnableNoiseSuppression(audio_processing_.get());
+ if (goog_ns) {
+ // The beamforming postfilter is effective at suppressing stationary noise,
+ // so reduce the single-channel NS aggressiveness when enabled.
+ const NoiseSuppression::Level ns_level =
+ config.Get<webrtc::Beamforming>().enabled ? NoiseSuppression::kLow
+ : NoiseSuppression::kHigh;
+
+ EnableNoiseSuppression(audio_processing_.get(), ns_level);
+ }
if (goog_high_pass_filter)
EnableHighPassFilter(audio_processing_.get());
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.h ('k') | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698