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

Unified Diff: webrtc/test/fake_audio_device.cc

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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/test/fake_audio_device.cc
diff --git a/webrtc/test/fake_audio_device.cc b/webrtc/test/fake_audio_device.cc
index bf89860f0bc454b6e7d2c50cc46b00cc9560a406..bea125b14c085b8694b52d215c384f87169e74aa 100644
--- a/webrtc/test/fake_audio_device.cc
+++ b/webrtc/test/fake_audio_device.cc
@@ -115,9 +115,10 @@ void FakeAudioDevice::CaptureAudio() {
uint32_t samples_needed = kFrequencyHz / 100;
int64_t now_ms = clock_->TimeInMilliseconds();
uint32_t time_since_last_playout_ms = now_ms - last_playout_ms_;
- if (last_playout_ms_ > 0 && time_since_last_playout_ms > 0)
+ if (last_playout_ms_ > 0 && time_since_last_playout_ms > 0) {
samples_needed = std::min(kFrequencyHz / time_since_last_playout_ms,
kBufferSizeBytes / 2);
+ }
uint32_t samples_out = 0;
int64_t elapsed_time_ms = -1;
int64_t ntp_time_ms = -1;

Powered by Google App Engine
This is Rietveld 408576698