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

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: Changes in response to reviewer comments 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 << "{"
269 << "enabled:" << (config.enabled ? "true" : "false") << "}";
the sun 2016/09/08 20:32:27 nit: space after the ":"
peah-webrtc 2016/09/09 12:58:26 Done.
270 return ss.str();
271 }
272
273 bool LevelController::Validate(
274 const AudioProcessing::Config::LevelController& config) {
275 return true;
276 }
277
265 } // namespace webrtc 278 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698