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 ac27f2d590488308afb0224e102a4622dd7a7bef..0599d6022580afeaa79085044a87dcb240f2ba2c 100644 |
--- a/media/audio/mac/audio_low_latency_input_mac.cc |
+++ b/media/audio/mac/audio_low_latency_input_mac.cc |
@@ -537,10 +537,25 @@ void AUAudioInputStream::Close() { |
CloseAudioUnit(); |
// Disable the listener for device property changes. |
DeRegisterDeviceChangeListener(); |
- // Check if any device property changes are added by filtering out a selected |
- // set of the |device_property_changes_map_| map. Add UMA stats if valuable |
- // data is found. |
- AddDevicePropertyChangesToUMA(false); |
+ // Add more UMA stats but only if AGC was activated, i.e. for e.g. WebRTC |
+ // audio input streams. |
+ if (GetAutomaticGainControl()) { |
+ // Check if any device property changes are added by filtering out a |
+ // selected set of the |device_property_changes_map_| map. Add UMA stats |
+ // if valuable data is found. |
+ AddDevicePropertyChangesToUMA(false); |
+ // Log if call to Start() was deferred or not. To be compared with |
Ilya Sherman
2016/03/02 22:57:24
nit: s/Log if ... or not/Log whether ...
henrika (OOO until Aug 14)
2016/03/03 09:44:39
Done.
|
+ // Media.Audio.InputStartWasDeferredMac which logs the same value but only |
+ // when input audio fail to start. |
Ilya Sherman
2016/03/02 22:57:24
nit: s/fail/fails
henrika (OOO until Aug 14)
2016/03/03 09:44:39
Done.
|
+ UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputStartWasDeferredAudioWorkedMac", |
+ start_was_deferred_); |
+ // Log if a change of I/O buffer size was required. To be compared with |
+ // Media.Audio.InputBufferSizeWasChangedMac which logs the same value but |
+ // only when input audio fail to start. |
+ UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputBufferSizeWasChangedAudioWorkedMac", |
+ buffer_size_was_changed_); |
+ // TODO(henrika): possibly add more values here... |
+ } |
// Inform the audio manager that we have been closed. This will cause our |
// destruction. |
manager_->ReleaseInputStream(this); |