Index: media/audio/mac/audio_low_latency_input_mac.cc |
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc |
index e8008c433df9f9baaa9536460af6545892b137d7..2429dd1a442d3dc90e539924aaa6790bc6169913 100644 |
--- a/media/audio/mac/audio_low_latency_input_mac.cc |
+++ b/media/audio/mac/audio_low_latency_input_mac.cc |
@@ -12,7 +12,6 @@ |
#include "base/mac/mac_logging.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/metrics/sparse_histogram.h" |
-#include "base/strings/stringprintf.h" |
#include "base/sys_info.h" |
#include "base/time/time.h" |
#include "media/audio/mac/audio_manager_mac.h" |
@@ -237,11 +236,9 @@ |
// http://developer.apple.com/library/mac/#technotes/tn2091/_index.html |
// for more details and background regarding this implementation. |
-AUAudioInputStream::AUAudioInputStream( |
- AudioManagerMac* manager, |
- const AudioParameters& input_params, |
- AudioDeviceID audio_device_id, |
- const AudioManager::LogCallback& log_callback) |
+AUAudioInputStream::AUAudioInputStream(AudioManagerMac* manager, |
+ const AudioParameters& input_params, |
+ AudioDeviceID audio_device_id) |
: manager_(manager), |
number_of_frames_(input_params.frames_per_buffer()), |
number_of_frames_provided_(0), |
@@ -267,7 +264,6 @@ |
number_of_restart_indications_(0), |
number_of_restart_attempts_(0), |
total_number_of_restart_attempts_(0), |
- log_callback_(log_callback), |
weak_factory_(this) { |
DCHECK(manager_); |
@@ -1649,13 +1645,8 @@ |
// how often we get no glitches vs the alternative. |
UMA_HISTOGRAM_COUNTS("Media.Audio.Capture.Glitches", glitches_detected_); |
- auto lost_frames_ms = (total_lost_frames_ * 1000) / format_.mSampleRate; |
- std::string log_message = base::StringPrintf( |
- "AU in: Total glitches=%d. Total frames lost=%d (%.0lf ms).", |
- glitches_detected_, total_lost_frames_, lost_frames_ms); |
- log_callback_.Run(log_message); |
- |
if (glitches_detected_ != 0) { |
+ auto lost_frames_ms = (total_lost_frames_ * 1000) / format_.mSampleRate; |
UMA_HISTOGRAM_LONG_TIMES("Media.Audio.Capture.LostFramesInMs", |
base::TimeDelta::FromMilliseconds(lost_frames_ms)); |
auto largest_glitch_ms = |
@@ -1665,7 +1656,9 @@ |
base::TimeDelta::FromMilliseconds(largest_glitch_ms), |
base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1), |
50); |
- DLOG(WARNING) << log_message; |
+ DLOG(WARNING) << "Total glitches=" << glitches_detected_ |
+ << ". Total frames lost=" << total_lost_frames_ << " (" |
+ << lost_frames_ms << ")"; |
} |
number_of_frames_provided_ = 0; |