Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 1621313002: Track stats for errors in AUAudioInputStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/mac/audio_low_latency_input_mac.h" 5 #include "media/audio/mac/audio_low_latency_input_mac.h"
6 6
7 #include <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_logging.h" 10 #include "base/mac/mac_logging.h"
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 input_device_id_, &property_address, 0, nullptr, &size, &stream_format); 768 input_device_id_, &property_address, 0, nullptr, &size, &stream_format);
769 if (result != noErr) { 769 if (result != noErr) {
770 DLOG(WARNING) << "Could not get stream format"; 770 DLOG(WARNING) << "Could not get stream format";
771 return 0; 771 return 0;
772 } 772 }
773 773
774 return static_cast<int>(stream_format.mChannelsPerFrame); 774 return static_cast<int>(stream_format.mChannelsPerFrame);
775 } 775 }
776 776
777 void AUAudioInputStream::HandleError(OSStatus err) { 777 void AUAudioInputStream::HandleError(OSStatus err) {
778 UMA_HISTOGRAM_SPARSE_SLOWLY("Media.InputErrorMac", err);
778 NOTREACHED() << "error " << GetMacOSStatusErrorString(err) 779 NOTREACHED() << "error " << GetMacOSStatusErrorString(err)
779 << " (" << err << ")"; 780 << " (" << err << ")";
780 if (sink_) 781 if (sink_)
781 sink_->OnError(this); 782 sink_->OnError(this);
782 } 783 }
783 784
784 bool AUAudioInputStream::IsVolumeSettableOnChannel(int channel) { 785 bool AUAudioInputStream::IsVolumeSettableOnChannel(int channel) {
785 Boolean is_settable = false; 786 Boolean is_settable = false;
786 AudioObjectPropertyAddress property_address = { 787 AudioObjectPropertyAddress property_address = {
787 kAudioDevicePropertyVolumeScalar, 788 kAudioDevicePropertyVolumeScalar,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 manager_->low_latency_input_streams()); 849 manager_->low_latency_input_streams());
849 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac", 850 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac",
850 manager_->basic_input_streams()); 851 manager_->basic_input_streams());
851 // TODO(henrika): this value will currently always report true. It should be 852 // TODO(henrika): this value will currently always report true. It should be
852 // fixed when we understand the problem better. 853 // fixed when we understand the problem better.
853 UMA_HISTOGRAM_BOOLEAN("Media.Audio.AutomaticGainControlMac", 854 UMA_HISTOGRAM_BOOLEAN("Media.Audio.AutomaticGainControlMac",
854 GetAutomaticGainControl()); 855 GetAutomaticGainControl());
855 } 856 }
856 857
857 } // namespace media 858 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698