Index: webrtc/modules/audio_device/ios/audio_device_ios.mm |
diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
index fd2b2e7422780d50ae024e5a5185370f4c46cdff..b224359307f5ceb78ba6fc0afad57439f29739f2 100644 |
--- a/webrtc/modules/audio_device/ios/audio_device_ios.mm |
+++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
@@ -245,6 +245,7 @@ int32_t AudioDeviceIOS::StartPlayout() { |
} |
rtc::AtomicOps::ReleaseStore(&playing_, 1); |
num_playout_callbacks_ = 0; |
+ num_detected_playout_glitches_ = 0; |
return 0; |
} |
@@ -263,7 +264,7 @@ int32_t AudioDeviceIOS::StopPlayout() { |
// Derive average number of calls to OnGetPlayoutData() between detected |
// audio glitches and add the result to a histogram. |
int average_number_of_playout_callbacks_between_glitches = 100000; |
- if (num_detected_playout_glitches_ > 0) { |
+ if (num_playout_callbacks_ > 0 && num_detected_playout_glitches_ > 0) { |
minyue-webrtc
2017/07/05 08:20:21
num_playout_callbacks_ > 0 is redundant if, by des
henrika_webrtc
2017/07/05 08:39:35
Acknowledged.
|
average_number_of_playout_callbacks_between_glitches = |
num_playout_callbacks_ / num_detected_playout_glitches_; |
} |