Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/AudioContext.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp |
| index ecaffd59494a65c28508c31ca42b1d9fabb61eda..f7cc9c928a7f3b814c40749e345b535337eaaf75 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp |
| @@ -10,6 +10,7 @@ |
| #include "core/dom/DOMException.h" |
| #include "core/dom/ExceptionCode.h" |
| #include "modules/webaudio/AudioBufferCallback.h" |
| +#include "platform/Histogram.h" |
| #include "platform/audio/AudioUtilities.h" |
| #if DEBUG_AUDIONODE_REFERENCES |
| @@ -66,6 +67,13 @@ AbstractAudioContext* AudioContext::create(Document& document, ExceptionState& e |
| audioContext, audioContext->m_contextId, s_hardwareContextCount); |
| #endif |
| + DEFINE_STATIC_LOCAL(SparseHistogram, maxChannelCountHistogram, |
| + ("WebAudio.AudioContext.MaxChannelsAvailable")); |
| + DEFINE_STATIC_LOCAL(SparseHistogram, sampleRateHistogram, |
| + ("WebAudio.AudioContext.HardwareSampleRate")); |
|
Mark P
2016/06/10 04:02:53
Is this generally fixed or should this be a custom
Raymond Toy
2016/06/10 15:13:44
We expect the possible values for the hardware sam
|
| + maxChannelCountHistogram.sample(audioContext->destination()->maxChannelCount()); |
| + sampleRateHistogram.sample(audioContext->sampleRate()); |
| + |
| return audioContext; |
| } |