Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| index 2d1e489aa55875d48d66576e229779f104f79649..13f577e2df2176cdf6b5f5e9eccc9f458a9b47ca 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| @@ -253,7 +253,7 @@ AudioBuffer* BaseAudioContext::createBuffer(unsigned numberOfChannels, size_t nu |
| // AudioUtilities::maxAudioBufferSampleRate(). The number of buckets is |
| // fairly arbitrary. |
| DEFINE_STATIC_LOCAL(CustomCountHistogram, audioBufferSampleRateHistogram, |
| - ("WebAudio.AudioBuffer.SampleRate", 3000, 192000, 60)); |
| + ("WebAudio.AudioBuffer.SampleRate384k", 3000, 384000, 60)); |
| audioBufferChannelsHistogram.sample(numberOfChannels); |
| audioBufferLengthHistogram.count(numberOfFrames); |
| @@ -265,12 +265,12 @@ AudioBuffer* BaseAudioContext::createBuffer(unsigned numberOfChannels, size_t nu |
| // integer. If the context is closed, don't record this because we |
| // don't have a sample rate for closed context. |
| if (!isContextClosed()) { |
| - // The limits are choosen from 100*(3000/192000) = 1.5625 and |
| - // 100*(192000/3000) = 6400, where 3000 and 192000 are the current |
| + // The limits are choosen from 100*(3000/384000) = 0.78125 and |
| + // 100*(384000/3000) = 12800, where 3000 and 384000 are the current |
| // min and max sample rates possible for an AudioBuffer. The number |
| // of buckets is fairly arbitrary. |
| DEFINE_STATIC_LOCAL(CustomCountHistogram, audioBufferSampleRateRatioHistogram, |
| - ("WebAudio.AudioBuffer.SampleRateRatio", 1, 6400, 50)); |
| + ("WebAudio.AudioBuffer.SampleRateRatio384K", 0, 12800, 50)); |
|
Mark P
2016/09/15 23:16:31
Min of histogram should always be "1". There will
Raymond Toy
2016/10/10 16:28:32
Done.
|
| float ratio = 100 * sampleRate / this->sampleRate(); |
| audioBufferSampleRateRatioHistogram.count(static_cast<int>(0.5 + ratio)); |
| } |