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

Side by Side Diff: content/renderer/media/media_stream_audio_processor_options.cc

Issue 183883013: Hook up the experimental ns to APM in chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_options.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_audio_processor_options.h" 5 #include "content/renderer/media/media_stream_audio_processor_options.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #endif 112 #endif
113 } 113 }
114 114
115 void EnableNoiseSuppression(AudioProcessing* audio_processing) { 115 void EnableNoiseSuppression(AudioProcessing* audio_processing) {
116 int err = audio_processing->noise_suppression()->set_level( 116 int err = audio_processing->noise_suppression()->set_level(
117 webrtc::NoiseSuppression::kHigh); 117 webrtc::NoiseSuppression::kHigh);
118 err |= audio_processing->noise_suppression()->Enable(true); 118 err |= audio_processing->noise_suppression()->Enable(true);
119 CHECK_EQ(err, 0); 119 CHECK_EQ(err, 0);
120 } 120 }
121 121
122 void EnableExperimentalNoiseSuppression(AudioProcessing* audio_processing) {
123 CHECK_EQ(audio_processing->EnableExperimentalNs(true), 0);
124 }
125
122 void EnableHighPassFilter(AudioProcessing* audio_processing) { 126 void EnableHighPassFilter(AudioProcessing* audio_processing) {
123 CHECK_EQ(audio_processing->high_pass_filter()->Enable(true), 0); 127 CHECK_EQ(audio_processing->high_pass_filter()->Enable(true), 0);
124 } 128 }
125 129
126 void EnableTypingDetection(AudioProcessing* audio_processing, 130 void EnableTypingDetection(AudioProcessing* audio_processing,
127 webrtc::TypingDetection* typing_detector) { 131 webrtc::TypingDetection* typing_detector) {
128 int err = audio_processing->voice_detection()->Enable(true); 132 int err = audio_processing->voice_detection()->Enable(true);
129 err |= audio_processing->voice_detection()->set_likelihood( 133 err |= audio_processing->voice_detection()->set_likelihood(
130 webrtc::VoiceDetection::kVeryLowLikelihood); 134 webrtc::VoiceDetection::kVeryLowLikelihood);
131 CHECK_EQ(err, 0); 135 CHECK_EQ(err, 0);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const webrtc::GainControl::Mode mode = webrtc::GainControl::kFixedDigital; 176 const webrtc::GainControl::Mode mode = webrtc::GainControl::kFixedDigital;
173 #else 177 #else
174 const webrtc::GainControl::Mode mode = webrtc::GainControl::kAdaptiveAnalog; 178 const webrtc::GainControl::Mode mode = webrtc::GainControl::kAdaptiveAnalog;
175 #endif 179 #endif
176 int err = audio_processing->gain_control()->set_mode(mode); 180 int err = audio_processing->gain_control()->set_mode(mode);
177 err |= audio_processing->gain_control()->Enable(true); 181 err |= audio_processing->gain_control()->Enable(true);
178 CHECK_EQ(err, 0); 182 CHECK_EQ(err, 0);
179 } 183 }
180 184
181 } // namespace content 185 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_options.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698