Streamline error handling and logging in the audio processing module
Bug: webrtc:8529
Change-Id: I40817d578c2c4106892e564df1bc734efcef5503
Reviewed-on: https://webrtc-review.googlesource.com/52540
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22034}
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index 240d663..2c292f7 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -449,9 +449,8 @@
private_submodules_->gain_controller2.reset(new GainController2());
RTC_LOG(LS_INFO) << "Capture post processor activated: "
- << !!private_submodules_->capture_post_processor;
-
- RTC_LOG(LS_INFO) << "Render pre processor activated: "
+ << !!private_submodules_->capture_post_processor
+ << "\nRender pre processor activated: "
<< !!private_submodules_->render_pre_processor;
}
@@ -709,11 +708,10 @@
bool config_ok = LevelController::Validate(config_.level_controller);
if (!config_ok) {
- RTC_LOG(LS_ERROR) << "AudioProcessing module config error" << std::endl
- << "level_controller: "
+ RTC_LOG(LS_ERROR) << "AudioProcessing module config error\n"
+ "level_controller: "
<< LevelController::ToString(config_.level_controller)
- << std::endl
- << "Reverting to default parameter set";
+ << "\nReverting to default parameter set";
config_.level_controller = AudioProcessing::Config::LevelController();
}
@@ -743,11 +741,10 @@
config_ok = GainController2::Validate(config_.gain_controller2);
if (!config_ok) {
- RTC_LOG(LS_ERROR) << "AudioProcessing module config error" << std::endl
- << "Gain Controller 2: "
+ RTC_LOG(LS_ERROR) << "AudioProcessing module config error\n"
+ "Gain Controller 2: "
<< GainController2::ToString(config_.gain_controller2)
- << std::endl
- << "Reverting to default parameter set";
+ << "\nReverting to default parameter set";
config_.gain_controller2 = AudioProcessing::Config::GainController2();
}
InitializeGainController2();