Chromium Code Reviews| 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 enum AudioSampleRate { | 13 enum AudioSampleRate { |
| 14 // Do not change the order of these values. | 14 // Do not change the order of these values. |
| 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 k192000Hz = 8, | |
|
scherkus (not reviewing)
2012/09/11 17:38:33
FYI my mac lists 88.2 as well
DaleCurtis
2012/09/12 09:50:57
Done. Plus a few more from SoundFlower on my mac.
| |
| 23 kUnexpectedAudioSampleRate // Must always be last! | 24 kUnexpectedAudioSampleRate // Must always be last! |
| 24 }; | 25 }; |
| 25 | 26 |
| 26 // Helper method to convert integral values to their respective enum values, | 27 // Helper method to convert integral values to their respective enum values, |
| 27 // or kUnexpectedAudioSampleRate if no match exists. | 28 // or kUnexpectedAudioSampleRate if no match exists. |
| 28 MEDIA_EXPORT AudioSampleRate AsAudioSampleRate(int sample_rate); | 29 MEDIA_EXPORT AudioSampleRate AsAudioSampleRate(int sample_rate); |
| 29 | 30 |
| 30 } // namespace media | 31 } // namespace media |
| 31 | 32 |
| 32 #endif // MEDIA_AUDIO_SAMPLE_RATES_H_ | 33 #endif // MEDIA_AUDIO_SAMPLE_RATES_H_ |
| OLD | NEW |