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}
diff --git a/modules/audio_processing/voice_detection_impl.cc b/modules/audio_processing/voice_detection_impl.cc
index 5ee0c7b..9280be1 100644
--- a/modules/audio_processing/voice_detection_impl.cc
+++ b/modules/audio_processing/voice_detection_impl.cc
@@ -23,10 +23,9 @@
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 @@
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 @@
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 @@
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;