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

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

Issue 2554823002: Change to use the new API in the audio processing module for enabling the high-pass filter effect (Closed)
Patch Set: Created 4 years 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 | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 536e5da53e7aad0b53f74201b6fea7b784db3da9..a51d223042ae54da6f9effa2dd9ebbd5687e8208 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -631,6 +631,8 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
audio_processing_.reset(webrtc::AudioProcessing::Create(config));
// Enable the audio processing components.
+ webrtc::AudioProcessing::Config apm_config;
+
if (echo_cancellation) {
EnableEchoCancellation(audio_processing_.get());
@@ -652,8 +654,7 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
EnableNoiseSuppression(audio_processing_.get(), ns_level);
}
- if (goog_high_pass_filter)
- EnableHighPassFilter(audio_processing_.get());
+ apm_config.high_pass_filter.enabled = goog_high_pass_filter;
if (goog_typing_detection) {
// TODO(xians): Remove this |typing_detector_| after the typing suppression
@@ -665,6 +666,8 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
if (goog_agc)
EnableAutomaticGainControl(audio_processing_.get());
+ audio_processing_->ApplyConfig(apm_config);
+
RecordProcessingState(AUDIO_PROCESSING_ENABLED);
}
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698