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

Side by Side Diff: webrtc/modules/audio_processing/level_controller/level_controller.cc

Issue 2292863002: Introduced new scheme for controlling the functionality inside the audio processing module (Closed)
Patch Set: Corrected comment Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 data_dumper_->DumpRaw("lc_selected_gain", 1, &last_gain_); 256 data_dumper_->DumpRaw("lc_selected_gain", 1, &last_gain_);
257 data_dumper_->DumpRaw("lc_noise_energy", 1, &noise_energy); 257 data_dumper_->DumpRaw("lc_noise_energy", 1, &noise_energy);
258 data_dumper_->DumpRaw("lc_peak_level", 1, &long_term_peak_level); 258 data_dumper_->DumpRaw("lc_peak_level", 1, &long_term_peak_level);
259 data_dumper_->DumpRaw("lc_saturating_gain", 1, &saturating_gain); 259 data_dumper_->DumpRaw("lc_saturating_gain", 1, &saturating_gain);
260 260
261 data_dumper_->DumpWav("lc_output", audio->num_frames(), 261 data_dumper_->DumpWav("lc_output", audio->num_frames(),
262 audio->channels_f()[0], *sample_rate_hz_, 1); 262 audio->channels_f()[0], *sample_rate_hz_, 1);
263 } 263 }
264 264
265 std::string LevelController::ToString(
266 const AudioProcessing::Config::LevelController& config) {
267 std::stringstream ss;
268 ss << "{ LevelController config: "
the sun 2016/09/08 09:45:55 Sorry, I should've noticed: only name the individu
peah-webrtc 2016/09/08 19:34:25 Done.
269 << "{"
270 << "enabled=" << (config.enabled ? "true" : "false") << "}";
the sun 2016/09/08 09:45:55 "enabled: "
peah-webrtc 2016/09/08 19:34:25 Done.
271 return ss.str();
272 }
273
274 AudioProcessing::Config::LevelController LevelController::DefaultConfig() {
275 AudioProcessing::Config::LevelController config;
276 config.enabled = false;
277 return config;
278 }
279
280 bool LevelController::Validate(
281 const AudioProcessing::Config::LevelController& config) {
282 return true;
283 }
284
265 } // namespace webrtc 285 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698