OLD | NEW |
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_module.h" | 9 #include "ppapi/c/pp_module.h" |
9 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/c/pp_stdint.h" | 11 #include "ppapi/c/pp_stdint.h" |
11 | 12 |
12 #define PPB_AUDIO_CONFIG_DEV_INTERFACE "PPB_AudioConfig(Dev);0.2" | 13 #define PPB_AUDIO_CONFIG_DEV_INTERFACE "PPB_AudioConfig(Dev);0.3" |
13 | 14 |
14 enum { | 15 enum { |
15 PP_AUDIOMINSAMPLEFRAMECOUNT = 64, | 16 PP_AUDIOMINSAMPLEFRAMECOUNT = 64, |
16 PP_AUDIOMAXSAMPLEFRAMECOUNT = 32768 | 17 PP_AUDIOMAXSAMPLEFRAMECOUNT = 32768 |
17 }; | 18 }; |
18 | 19 |
19 typedef enum { | 20 typedef enum { |
20 PP_AUDIOSAMPLERATE_NONE = 0, | 21 PP_AUDIOSAMPLERATE_NONE = 0, |
21 PP_AUDIOSAMPLERATE_44100 = 44100, | 22 PP_AUDIOSAMPLERATE_44100 = 44100, |
22 PP_AUDIOSAMPLERATE_48000 = 48000 | 23 PP_AUDIOSAMPLERATE_48000 = 48000 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 * will return a supported count closest to the requested value. | 68 * will return a supported count closest to the requested value. |
68 * | 69 * |
69 * If you pass 0 as the requested sample count, the recommended sample for | 70 * If you pass 0 as the requested sample count, the recommended sample for |
70 * the local system is returned. | 71 * the local system is returned. |
71 */ | 72 */ |
72 uint32_t (*RecommendSampleFrameCount)(uint32_t requested_sample_frame_count); | 73 uint32_t (*RecommendSampleFrameCount)(uint32_t requested_sample_frame_count); |
73 | 74 |
74 /** | 75 /** |
75 * Returns true if the given resource is an AudioConfig object. | 76 * Returns true if the given resource is an AudioConfig object. |
76 */ | 77 */ |
77 bool (*IsAudioConfig)(PP_Resource resource); | 78 PP_Bool (*IsAudioConfig)(PP_Resource resource); |
78 | 79 |
79 /** | 80 /** |
80 * Returns the sample rate for the given AudioConfig resource. If the | 81 * Returns the sample rate for the given AudioConfig resource. If the |
81 * resource is invalid, this will return PP_AUDIOSAMPLERATE_NONE. | 82 * resource is invalid, this will return PP_AUDIOSAMPLERATE_NONE. |
82 */ | 83 */ |
83 PP_AudioSampleRate_Dev (*GetSampleRate)(PP_Resource config); | 84 PP_AudioSampleRate_Dev (*GetSampleRate)(PP_Resource config); |
84 | 85 |
85 /** | 86 /** |
86 * Returns the sample frame count for the given AudioConfig resource. If the | 87 * Returns the sample frame count for the given AudioConfig resource. If the |
87 * resource is invalid, this will return 0. See RecommendSampleFrameCount for | 88 * resource is invalid, this will return 0. See RecommendSampleFrameCount for |
88 * more on sample frame counts. | 89 * more on sample frame counts. |
89 */ | 90 */ |
90 uint32_t (*GetSampleFrameCount)(PP_Resource config); | 91 uint32_t (*GetSampleFrameCount)(PP_Resource config); |
91 }; | 92 }; |
92 | 93 |
93 #endif // PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_ | 94 #endif // PPAPI_C_DEV_PPB_AUDIO_CONFIG_DEV_H_ |
94 | |
OLD | NEW |