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

Unified 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: Removed the validation method and added logging of the config settings and revertion to default val… 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/level_controller/level_controller.cc
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.cc b/webrtc/modules/audio_processing/level_controller/level_controller.cc
index 2294396607505f86511e83f12f110a8a636601bf..2fb34851e68b07d77d675f481b85922099d66e4b 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.cc
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.cc
@@ -262,4 +262,23 @@ void LevelController::Process(AudioBuffer* audio) {
audio->channels_f()[0], *sample_rate_hz_, 1);
}
+std::string LevelController::ToString(
+ const AudioProcessing::Config::LevelController& config) {
+ std::stringstream ss;
+ 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.
+ << "enabled=" << (config.enabled ? "true" : "false");
+ return ss.str();
+}
+
+AudioProcessing::Config::LevelController LevelController::DefaultConfig() {
+ AudioProcessing::Config::LevelController config;
+ 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
+ return config;
+}
+
+bool LevelController::Validate(
+ const AudioProcessing::Config::LevelController& config) {
+ return true;
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698