Reduce verbosity of logging around playout underrun count on iOS.
This method is called on every GetStats call and fills up log output on iOS
with three log lines per cycle at INFO+ (the not-supported one is LS_ERROR):
[181:040] [82471] (audio_device_module_ios.mm:646): GetPlayoutUnderrunCount
[181:040] [82471] (audio_device_generic.cc:48): GetPlayoutUnderrunCount: Not supported on this platform
[181:040] [82471] (audio_device_module_ios.mm:649): output: -1
Alternatively, we could remove the error logging in the base class, or (better) log it once the first time it is called, but this is the simpler change.
Bug: None
Change-Id: Ibaa1d176f10cdc92f2ba1a6bf15aaa580da6edb4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159672
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29797}
diff --git a/sdk/objc/native/src/audio/audio_device_ios.h b/sdk/objc/native/src/audio/audio_device_ios.h
index 64fcf2c..9d25172 100644
--- a/sdk/objc/native/src/audio/audio_device_ios.h
+++ b/sdk/objc/native/src/audio/audio_device_ios.h
@@ -82,6 +82,10 @@
// the log by using these dummy implementations instead.
int32_t PlayoutDelay(uint16_t& delayMS) const override;
+ // No implementation for playout underrun on iOS. We override it to avoid a
+ // periodic log that it isn't available from the base class.
+ int32_t GetPlayoutUnderrunCount() const override { return -1; }
+
// Native audio parameters stored during construction.
// These methods are unique for the iOS implementation.
int GetPlayoutAudioParameters(AudioParameters* params) const override;
diff --git a/sdk/objc/native/src/audio/audio_device_module_ios.mm b/sdk/objc/native/src/audio/audio_device_module_ios.mm
index 74d2965..fbfa88f 100644
--- a/sdk/objc/native/src/audio/audio_device_module_ios.mm
+++ b/sdk/objc/native/src/audio/audio_device_module_ios.mm
@@ -643,10 +643,9 @@
}
int32_t AudioDeviceModuleIOS::GetPlayoutUnderrunCount() const {
- RTC_LOG(INFO) << __FUNCTION__;
+ // Don't log here, as this method can be called very often.
CHECKinitialized_();
int32_t ok = audio_device_->GetPlayoutUnderrunCount();
- RTC_LOG(INFO) << "output: " << ok;
return ok;
}