Chromium Code Reviews| Index: media/audio/audio_output_resampler.cc |
| diff --git a/media/audio/audio_output_resampler.cc b/media/audio/audio_output_resampler.cc |
| index e67e2771649443f2c6c494fef07940c4162ca19a..be4802a6f6d6bd420c6cfd9717a549ed41f2ac21 100644 |
| --- a/media/audio/audio_output_resampler.cc |
| +++ b/media/audio/audio_output_resampler.cc |
| @@ -8,11 +8,13 @@ |
| #include "base/bind_helpers.h" |
| #include "base/compiler_specific.h" |
| #include "base/message_loop.h" |
| +#include "base/metrics/histogram.h" |
| #include "base/time.h" |
| #include "media/audio/audio_io.h" |
| #include "media/audio/audio_output_dispatcher_impl.h" |
| #include "media/audio/audio_output_proxy.h" |
| #include "media/audio/audio_util.h" |
| +#include "media/audio/sample_rates.h" |
| #include "media/base/audio_pull_fifo.h" |
| #include "media/base/multi_channel_resampler.h" |
| @@ -77,6 +79,24 @@ AudioOutputResampler::AudioOutputResampler(AudioManager* audio_manager, |
| // we've stabilized the issues there. |
| dispatcher_ = new AudioOutputDispatcherImpl( |
| audio_manager, output_params, close_delay); |
| + |
| + // Fake enum histogram to get exact integral buckets. Expect to never see |
| + // any values over 32 and even that is huge. |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "Media.HardwareAudioBitsPerChannel", output_params.bits_per_sample(), |
| + 40); |
|
scherkus (not reviewing)
2012/09/11 16:53:31
not worth enumifying a la sample rate?
DaleCurtis
2012/09/11 17:35:59
Copy/pasted from AudioDecoderConfig. You tell me.
|
| + UMA_HISTOGRAM_ENUMERATION( |
| + "Media.HardwareAudioChannelLayout", output_params.channel_layout(), |
|
scherkus (not reviewing)
2012/09/11 16:53:31
I thought we only got hardware channel *count* and
DaleCurtis
2012/09/11 17:35:59
This is all a copy paste of what's in AudioDecoder
DaleCurtis
2012/09/12 09:50:57
Done. I'm now pulling the actual hardware channel
|
| + CHANNEL_LAYOUT_MAX); |
| + AudioSampleRate asr = media::AsAudioSampleRate(output_params.sample_rate()); |
| + if (asr != kUnexpectedAudioSampleRate) { |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "Media.HardwareAudioSamplesPerSecond", asr, kUnexpectedAudioSampleRate); |
| + } else { |
| + UMA_HISTOGRAM_COUNTS( |
| + "Media.HardwareAudioSamplesPerSecondUnexpected", |
| + output_params.sample_rate()); |
| + } |
| } |
| AudioOutputResampler::~AudioOutputResampler() {} |