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 #include "media/audio/sample_rates.h"
9 AudioSampleRate
AsAudioSampleRate(int sample_rate
) {
10 switch (sample_rate
) {
11 case 8000: return k8000Hz
;
12 case 16000: return k16000Hz
;
13 case 32000: return k32000Hz
;
14 case 48000: return k48000Hz
;
15 case 96000: return k96000Hz
;
16 case 11025: return k11025Hz
;
17 case 22050: return k22050Hz
;
18 case 44100: return k44100Hz
;
19 case 88200: return k88200Hz
;
20 case 176400: return k176400Hz
;
21 case 192000: return k192000Hz
;
23 return kUnexpectedAudioSampleRate
;