Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -23,10 +23,9 @@ class VoiceDetectionImpl::Vad {
int error = WebRtcVad_Init(state_);
RTC_DCHECK_EQ(0, error);
}
~Vad() {
WebRtcVad_Free(state_);
}
~Vad() { WebRtcVad_Free(state_); }
VadInst* state() { return state_; }
private:
VadInst* state_ = nullptr;
RTC_DISALLOW_COPY_AND_ASSIGN(Vad);
@ -65,9 +64,9 @@ void VoiceDetectionImpl::ProcessCaptureAudio(AudioBuffer* audio) {
RTC_DCHECK_GE(160, audio->num_frames_per_band());
// TODO(ajm): concatenate data in frame buffer here.
int vad_ret = WebRtcVad_Process(vad_->state(), sample_rate_hz_,
audio->mixed_low_pass_data(),
frame_size_samples_);
int vad_ret =
WebRtcVad_Process(vad_->state(), sample_rate_hz_,
audio->mixed_low_pass_data(), frame_size_samples_);
if (vad_ret == 0) {
stream_has_voice_ = false;
audio->set_activity(AudioFrame::kVadPassive);
@ -103,7 +102,7 @@ int VoiceDetectionImpl::set_stream_has_voice(bool has_voice) {
bool VoiceDetectionImpl::stream_has_voice() const {
rtc::CritScope cs(crit_);
// TODO(ajm): enable this assertion?
//RTC_DCHECK(using_external_vad_ || is_component_enabled());
// RTC_DCHECK(using_external_vad_ || is_component_enabled());
return stream_has_voice_;
}
@ -142,7 +141,7 @@ VoiceDetection::Likelihood VoiceDetectionImpl::likelihood() const {
int VoiceDetectionImpl::set_frame_size_ms(int size) {
rtc::CritScope cs(crit_);
RTC_DCHECK_EQ(10, size); // TODO(ajm): remove when supported.
RTC_DCHECK_EQ(10, size); // TODO(ajm): remove when supported.
frame_size_ms_ = size;
Initialize(sample_rate_hz_);
return AudioProcessing::kNoError;