Create an initial chrome://supervised-user-internals page
[chromium-blink-merge.git] / media / audio / sample_rates.h
blobd2834e74f26cce02347f690c6166a6a7b1029bbb
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_AUDIO_SAMPLE_RATES_H_
6 #define MEDIA_AUDIO_SAMPLE_RATES_H_
8 #include "media/base/media_export.h"
10 namespace media {
12 // Enumeration used for histogramming sample rates into distinct buckets.
13 // Logged to UMA, so never reuse a value, always add new/greater ones!
14 enum AudioSampleRate {
15 k8000Hz = 0,
16 k16000Hz = 1,
17 k32000Hz = 2,
18 k48000Hz = 3,
19 k96000Hz = 4,
20 k11025Hz = 5,
21 k22050Hz = 6,
22 k44100Hz = 7,
23 k88200Hz = 8,
24 k176400Hz = 9,
25 k192000Hz = 10,
26 k24000Hz = 11,
27 // Must always equal the largest value ever reported:
28 kAudioSampleRateMax = k24000Hz,
31 // Helper method to convert integral values to their respective enum values,
32 // returns false for unexpected sample rates.
33 MEDIA_EXPORT bool ToAudioSampleRate(int sample_rate, AudioSampleRate* asr);
35 } // namespace media
37 #endif // MEDIA_AUDIO_SAMPLE_RATES_H_