Index: media/audio/mac/audio_auhal_mac.cc |
diff --git a/media/audio/mac/audio_auhal_mac.cc b/media/audio/mac/audio_auhal_mac.cc |
index 1e95898f38c15e29f64a69e5b64f9becfeacb6a2..42cd16d88a6df4ab30b226655ba3b2ea008ef58c 100644 |
--- a/media/audio/mac/audio_auhal_mac.cc |
+++ b/media/audio/mac/audio_auhal_mac.cc |
@@ -11,7 +11,6 @@ |
#include "base/logging.h" |
#include "base/mac/mac_logging.h" |
#include "base/metrics/histogram_macros.h" |
-#include "base/strings/stringprintf.h" |
#include "base/time/time.h" |
#include "base/trace_event/trace_event.h" |
#include "media/audio/mac/audio_manager_mac.h" |
@@ -40,8 +39,7 @@ |
AUHALStream::AUHALStream(AudioManagerMac* manager, |
const AudioParameters& params, |
- AudioDeviceID device, |
- const AudioManager::LogCallback& log_callback) |
+ AudioDeviceID device) |
: manager_(manager), |
params_(params), |
output_channels_(params_.channels()), |
@@ -59,8 +57,7 @@ |
last_number_of_frames_(0), |
total_lost_frames_(0), |
largest_glitch_frames_(0), |
- glitches_detected_(0), |
- log_callback_(log_callback) { |
+ glitches_detected_(0) { |
// We must have a manager. |
DCHECK(manager_); |
@@ -393,19 +390,16 @@ |
UMA_HISTOGRAM_CUSTOM_COUNTS("Media.Audio.Render.Glitches", glitches_detected_, |
0, 999999, 100); |
- auto lost_frames_ms = (total_lost_frames_ * 1000) / params_.sample_rate(); |
- std::string log_message = base::StringPrintf( |
- "AU out: Total glitches=%d. Total frames lost=%d (%d 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) / params_.sample_rate(); |
UMA_HISTOGRAM_COUNTS("Media.Audio.Render.LostFramesInMs", lost_frames_ms); |
auto largest_glitch_ms = |
(largest_glitch_frames_ * 1000) / params_.sample_rate(); |
UMA_HISTOGRAM_COUNTS("Media.Audio.Render.LargestGlitchMs", |
largest_glitch_ms); |
- DLOG(WARNING) << log_message; |
+ DLOG(WARNING) << "Total glitches=" << glitches_detected_ |
+ << ". Total frames lost=" << total_lost_frames_ << " (" |
+ << lost_frames_ms; |
} |
number_of_frames_requested_ = 0; |