OLD | NEW |
---|---|
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 #ifndef MEDIA_AUDIO_SAMPLE_RATES_H_ | 5 #ifndef MEDIA_AUDIO_SAMPLE_RATES_H_ |
6 #define MEDIA_AUDIO_SAMPLE_RATES_H_ | 6 #define MEDIA_AUDIO_SAMPLE_RATES_H_ |
7 | 7 |
8 #include "media/base/media_export.h" | 8 #include "media/base/media_export.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
11 | 11 |
12 // Enumeration used for histogramming sample rates into distinct buckets. | 12 // Enumeration used for histogramming sample rates into distinct buckets. |
13 // Logged to UMA, so never reuse a value, always add new/greater ones! | 13 // Logged to UMA, so never reuse a value, always add new/greater ones! |
14 enum AudioSampleRate { | 14 enum AudioSampleRate { |
15 k8000Hz = 0, | 15 k8000Hz = 0, |
16 k16000Hz = 1, | 16 k16000Hz = 1, |
17 k32000Hz = 2, | 17 k32000Hz = 2, |
18 k48000Hz = 3, | 18 k48000Hz = 3, |
19 k96000Hz = 4, | 19 k96000Hz = 4, |
20 k11025Hz = 5, | 20 k11025Hz = 5, |
21 k22050Hz = 6, | 21 k22050Hz = 6, |
22 k44100Hz = 7, | 22 k44100Hz = 7, |
23 k88200Hz = 8, | 23 k88200Hz = 8, |
24 k176400Hz = 9, | 24 k176400Hz = 9, |
25 k192000Hz = 10, | 25 k192000Hz = 10, |
26 kUnexpectedAudioSampleRate // Must always be last! | 26 kUnexpectedAudioSampleRate, |
27 kAudioSampleRateMax = | |
rileya (GONE FROM CHROMIUM)
2014/01/29 19:24:11
This is a little iffy -- kUnexpectedAudioSampleRat
Ami GONE FROM CHROMIUM
2014/01/29 21:29:02
kUnexpected is a terrible fit since it doesn't get
| |
28 kUnexpectedAudioSampleRate, // Must always equal last entry! | |
Ami GONE FROM CHROMIUM
2014/01/29 21:29:02
FWIW, here and elsewhere, the real requirement (fo
| |
27 }; | 29 }; |
28 | 30 |
29 // Helper method to convert integral values to their respective enum values, | 31 // Helper method to convert integral values to their respective enum values, |
30 // or kUnexpectedAudioSampleRate if no match exists. | 32 // or kUnexpectedAudioSampleRate if no match exists. |
31 MEDIA_EXPORT AudioSampleRate AsAudioSampleRate(int sample_rate); | 33 MEDIA_EXPORT AudioSampleRate AsAudioSampleRate(int sample_rate); |
32 | 34 |
33 } // namespace media | 35 } // namespace media |
34 | 36 |
35 #endif // MEDIA_AUDIO_SAMPLE_RATES_H_ | 37 #endif // MEDIA_AUDIO_SAMPLE_RATES_H_ |
OLD | NEW |