diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc index 0a3e69654e..90ac9d02ea 100644 --- a/webrtc/voice_engine/channel.cc +++ b/webrtc/voice_engine/channel.cc @@ -14,6 +14,7 @@ #include "webrtc/base/checks.h" #include "webrtc/base/format_macros.h" +#include "webrtc/base/logging.h" #include "webrtc/base/timeutils.h" #include "webrtc/common.h" #include "webrtc/config.h" @@ -27,7 +28,6 @@ #include "webrtc/modules/utility/include/audio_frame_operations.h" #include "webrtc/modules/utility/include/process_thread.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/include/voe_external_media.h" @@ -1020,11 +1020,11 @@ Channel::Init() } if (rx_audioproc_->noise_suppression()->set_level(kDefaultNsMode) != 0) { - LOG_FERR1(LS_ERROR, noise_suppression()->set_level, kDefaultNsMode); + LOG(LS_ERROR) << "noise_suppression()->set_level(kDefaultNsMode) failed."; return -1; } if (rx_audioproc_->gain_control()->set_mode(kDefaultRxAgcMode) != 0) { - LOG_FERR1(LS_ERROR, gain_control()->set_mode, kDefaultRxAgcMode); + LOG(LS_ERROR) << "gain_control()->set_mode(kDefaultRxAgcMode) failed."; return -1; } diff --git a/webrtc/voice_engine/transmit_mixer.cc b/webrtc/voice_engine/transmit_mixer.cc index 3af4c07ed3..2241f46bba 100644 --- a/webrtc/voice_engine/transmit_mixer.cc +++ b/webrtc/voice_engine/transmit_mixer.cc @@ -11,10 +11,10 @@ #include "webrtc/voice_engine/transmit_mixer.h" #include "webrtc/base/format_macros.h" +#include "webrtc/base/logging.h" #include "webrtc/modules/utility/include/audio_frame_operations.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" #include "webrtc/system_wrappers/include/event_wrapper.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/voice_engine/channel.h" #include "webrtc/voice_engine/channel_manager.h" @@ -1241,15 +1241,13 @@ int32_t TransmitMixer::MixOrReplaceAudioWithFile( void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift, int current_mic_level, bool key_pressed) { if (audioproc_->set_stream_delay_ms(delay_ms) != 0) { - // A redundant warning is reported in AudioDevice, which we've throttled - // to avoid flooding the logs. Relegate this one to LS_VERBOSE to avoid - // repeating the problem here. - LOG_FERR1(LS_VERBOSE, set_stream_delay_ms, delay_ms); + // Silently ignore this failure to avoid flooding the logs. } GainControl* agc = audioproc_->gain_control(); if (agc->set_stream_analog_level(current_mic_level) != 0) { - LOG_FERR1(LS_ERROR, set_stream_analog_level, current_mic_level); + LOG(LS_ERROR) << "set_stream_analog_level failed: current_mic_level = " + << current_mic_level; assert(false); } diff --git a/webrtc/voice_engine/utility.cc b/webrtc/voice_engine/utility.cc index b04163834c..eb442ecb8f 100644 --- a/webrtc/voice_engine/utility.cc +++ b/webrtc/voice_engine/utility.cc @@ -10,12 +10,12 @@ #include "webrtc/voice_engine/utility.h" +#include "webrtc/base/logging.h" #include "webrtc/common_audio/resampler/include/push_resampler.h" #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" #include "webrtc/common_types.h" #include "webrtc/modules/include/module_common_types.h" #include "webrtc/modules/utility/include/audio_frame_operations.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/voice_engine/voice_engine_defines.h" namespace webrtc { @@ -52,8 +52,10 @@ void RemixAndResample(const int16_t* src_data, if (resampler->InitializeIfNeeded(sample_rate_hz, dst_frame->sample_rate_hz_, audio_ptr_num_channels) == -1) { - LOG_FERR3(LS_ERROR, InitializeIfNeeded, sample_rate_hz, - dst_frame->sample_rate_hz_, audio_ptr_num_channels); + LOG(LS_ERROR) << "InitializeIfNeeded failed: sample_rate_hz = " + << sample_rate_hz << ", dst_frame->sample_rate_hz_ = " + << dst_frame->sample_rate_hz_ + << ", audio_ptr_num_channels = " << audio_ptr_num_channels; assert(false); } @@ -61,7 +63,9 @@ void RemixAndResample(const int16_t* src_data, int out_length = resampler->Resample(audio_ptr, src_length, dst_frame->data_, AudioFrame::kMaxDataSizeSamples); if (out_length == -1) { - LOG_FERR3(LS_ERROR, Resample, audio_ptr, src_length, dst_frame->data_); + LOG(LS_ERROR) << "Resample failed: audio_ptr = " << audio_ptr + << ", src_length = " << src_length + << ", dst_frame->data_ = " << dst_frame->data_; assert(false); } dst_frame->samples_per_channel_ = diff --git a/webrtc/voice_engine/voe_audio_processing_impl.cc b/webrtc/voice_engine/voe_audio_processing_impl.cc index 83f70fe68e..c95726339c 100644 --- a/webrtc/voice_engine/voe_audio_processing_impl.cc +++ b/webrtc/voice_engine/voe_audio_processing_impl.cc @@ -10,9 +10,9 @@ #include "webrtc/voice_engine/voe_audio_processing_impl.h" +#include "webrtc/base/logging.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/voice_engine/channel.h" #include "webrtc/voice_engine/include/voe_errors.h" @@ -317,7 +317,6 @@ int VoEAudioProcessingImpl::GetAgcConfig(AgcConfig& config) { int VoEAudioProcessingImpl::SetRxNsStatus(int channel, bool enable, NsModes mode) { - LOG_API3(channel, enable, mode); #ifdef WEBRTC_VOICE_ENGINE_NR if (!_shared->statistics().Initialized()) { _shared->SetLastError(VE_NOT_INITED, kTraceError); @@ -469,7 +468,6 @@ bool VoEAudioProcessing::DriftCompensationSupported() { } int VoEAudioProcessingImpl::EnableDriftCompensation(bool enable) { - LOG_API1(enable); WEBRTC_VOICE_INIT_CHECK(); if (!DriftCompensationSupported()) { @@ -489,7 +487,6 @@ int VoEAudioProcessingImpl::EnableDriftCompensation(bool enable) { } bool VoEAudioProcessingImpl::DriftCompensationEnabled() { - LOG_API0(); WEBRTC_VOICE_INIT_CHECK_BOOL(); EchoCancellation* aec = _shared->audio_processing()->echo_cancellation(); @@ -1038,12 +1035,10 @@ int VoEAudioProcessingImpl::SetTypingDetectionParameters(int timeWindow, } void VoEAudioProcessingImpl::EnableStereoChannelSwapping(bool enable) { - LOG_API1(enable); _shared->transmit_mixer()->EnableStereoChannelSwapping(enable); } bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() { - LOG_API0(); return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled(); } diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc index 2b5587ddef..60a649eefd 100644 --- a/webrtc/voice_engine/voe_base_impl.cc +++ b/webrtc/voice_engine/voe_base_impl.cc @@ -11,6 +11,7 @@ #include "webrtc/voice_engine/voe_base_impl.h" #include "webrtc/base/format_macros.h" +#include "webrtc/base/logging.h" #include "webrtc/common.h" #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" #include "webrtc/modules/audio_coding/include/audio_coding_module.h" @@ -18,7 +19,6 @@ #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" #include "webrtc/system_wrappers/include/file_wrapper.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/voice_engine/channel.h" #include "webrtc/voice_engine/include/voe_errors.h" #include "webrtc/voice_engine/output_mixer.h" diff --git a/webrtc/voice_engine/voe_network_impl.cc b/webrtc/voice_engine/voe_network_impl.cc index 4a0c3f7861..0574aa9f05 100644 --- a/webrtc/voice_engine/voe_network_impl.cc +++ b/webrtc/voice_engine/voe_network_impl.cc @@ -12,8 +12,8 @@ #include "webrtc/base/checks.h" #include "webrtc/base/format_macros.h" +#include "webrtc/base/logging.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/system_wrappers/include/logging.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/voice_engine/channel.h" #include "webrtc/voice_engine/include/voe_errors.h"