Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: media/audio/sample_rates.cc

Issue 10914203: Add UMA reporting for audio hardware parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/sample_rates.h ('k') | media/base/channel_layout.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "media/audio/sample_rates.h" 5 #include "media/audio/sample_rates.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 AudioSampleRate AsAudioSampleRate(int sample_rate) { 9 AudioSampleRate AsAudioSampleRate(int sample_rate) {
10 switch (sample_rate) { 10 switch (sample_rate) {
11 case 8000: return k8000Hz; 11 case 8000: return k8000Hz;
12 case 16000: return k16000Hz; 12 case 16000: return k16000Hz;
13 case 32000: return k32000Hz; 13 case 32000: return k32000Hz;
14 case 48000: return k48000Hz; 14 case 48000: return k48000Hz;
15 case 96000: return k96000Hz; 15 case 96000: return k96000Hz;
16 case 11025: return k11025Hz; 16 case 11025: return k11025Hz;
17 case 22050: return k22050Hz; 17 case 22050: return k22050Hz;
18 case 44100: return k44100Hz; 18 case 44100: return k44100Hz;
19 case 88200: return k88200Hz;
20 case 176400: return k176400Hz;
21 case 192000: return k192000Hz;
19 } 22 }
20 return kUnexpectedAudioSampleRate; 23 return kUnexpectedAudioSampleRate;
21 } 24 }
22 25
23 } // namespace media 26 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/sample_rates.h ('k') | media/base/channel_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698