Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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/07 15:49:39
Please use the json-ish way of string serializatio
peah-webrtc
2016/09/08 09:13:49
Good suggestion!
Done.
the sun
2016/09/08 09:45:55
Add a test for the function too.
peah-webrtc
2016/09/08 19:34:24
Done.
| |
| 269 << "enabled=" << (config.enabled ? "true" : "false"); | |
| 270 return ss.str(); | |
| 271 } | |
| 272 | |
| 273 AudioProcessing::Config::LevelController LevelController::DefaultConfig() { | |
| 274 AudioProcessing::Config::LevelController config; | |
| 275 config.enabled = false; | |
|
hlundin-webrtc
2016/09/07 21:13:05
The default config should be the one you get from
peah-webrtc
2016/09/08 09:13:49
You are probably correct that it is not needed, an
| |
| 276 return config; | |
| 277 } | |
| 278 | |
| 279 bool LevelController::Validate( | |
| 280 const AudioProcessing::Config::LevelController& config) { | |
| 281 return true; | |
| 282 } | |
| 283 | |
| 265 } // namespace webrtc | 284 } // namespace webrtc |
| OLD | NEW |