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

Side by Side Diff: ppapi/c/dev/ppb_audio_config_dev.h

Issue 5340003: Make a new test to enforce the sizes of all structs and enums in the C API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « ppapi/c/dev/pp_video_dev.h ('k') | ppapi/c/dev/ppb_char_set_dev.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_
6 #define PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_ 6 #define PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_module.h" 9 #include "ppapi/c/pp_module.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
12 12
13 #define PPB_AUDIO_CONFIG_DEV_INTERFACE "PPB_AudioConfig(Dev);0.3" 13 #define PPB_AUDIO_CONFIG_DEV_INTERFACE "PPB_AudioConfig(Dev);0.3"
14 14
15 enum { 15 enum {
16 PP_AUDIOMINSAMPLEFRAMECOUNT = 64, 16 PP_AUDIOMINSAMPLEFRAMECOUNT = 64,
17 PP_AUDIOMAXSAMPLEFRAMECOUNT = 32768 17 PP_AUDIOMAXSAMPLEFRAMECOUNT = 32768
18 }; 18 };
19 19
20 typedef enum { 20 typedef enum {
21 PP_AUDIOSAMPLERATE_NONE = 0, 21 PP_AUDIOSAMPLERATE_NONE = 0,
22 PP_AUDIOSAMPLERATE_44100 = 44100, 22 PP_AUDIOSAMPLERATE_44100 = 44100,
23 PP_AUDIOSAMPLERATE_48000 = 48000 23 PP_AUDIOSAMPLERATE_48000 = 48000
24 } PP_AudioSampleRate_Dev; 24 } PP_AudioSampleRate_Dev;
25 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_AudioSampleRate_Dev, 4);
25 26
26 /** 27 /**
27 * Audio configuration. This base configuration interface supports only stereo 28 * Audio configuration. This base configuration interface supports only stereo
28 * 16bit output. This class is not mutable, therefore it is okay to access 29 * 16bit output. This class is not mutable, therefore it is okay to access
29 * instances from different threads. 30 * instances from different threads.
30 */ 31 */
31 struct PPB_AudioConfig_Dev { 32 struct PPB_AudioConfig_Dev {
32 /** 33 /**
33 * Create a 16 bit stereo config with the given sample rate. We guarantee 34 * Create a 16 bit stereo config with the given sample rate. We guarantee
34 * that PP_AUDIOSAMPLERATE_44100 and PP_AUDIOSAMPLERATE_48000 sample rates 35 * that PP_AUDIOSAMPLERATE_44100 and PP_AUDIOSAMPLERATE_48000 sample rates
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 86
86 /** 87 /**
87 * Returns the sample frame count for the given AudioConfig resource. If the 88 * Returns the sample frame count for the given AudioConfig resource. If the
88 * resource is invalid, this will return 0. See RecommendSampleFrameCount for 89 * resource is invalid, this will return 0. See RecommendSampleFrameCount for
89 * more on sample frame counts. 90 * more on sample frame counts.
90 */ 91 */
91 uint32_t (*GetSampleFrameCount)(PP_Resource config); 92 uint32_t (*GetSampleFrameCount)(PP_Resource config);
92 }; 93 };
93 94
94 #endif // PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_ 95 #endif // PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/pp_video_dev.h ('k') | ppapi/c/dev/ppb_char_set_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698