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

Side by Side Diff: ppapi/c/ppb_audio_config.h

Issue 9416107: Change to interface to M19, add a few more test cases to test_audio. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « ppapi/api/ppb_audio_config.idl ('k') | ppapi/tests/test_audio.cc » ('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 5
6 /* From ppb_audio_config.idl modified Thu Feb 16 16:23:46 2012. */ 6 /* From ppb_audio_config.idl modified Wed Feb 22 14:49:51 2012. */
7 7
8 #ifndef PPAPI_C_PPB_AUDIO_CONFIG_H_ 8 #ifndef PPAPI_C_PPB_AUDIO_CONFIG_H_
9 #define PPAPI_C_PPB_AUDIO_CONFIG_H_ 9 #define PPAPI_C_PPB_AUDIO_CONFIG_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h" 14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
16 16
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 * closest to the requested count. The sample frame count determines the 114 * closest to the requested count. The sample frame count determines the
115 * overall latency of audio. Since one "frame" is always buffered in advance, 115 * overall latency of audio. Since one "frame" is always buffered in advance,
116 * smaller frame counts will yield lower latency, but higher CPU utilization. 116 * smaller frame counts will yield lower latency, but higher CPU utilization.
117 * 117 *
118 * Supported sample frame counts will vary by hardware and system (consider 118 * Supported sample frame counts will vary by hardware and system (consider
119 * that the local system might be anywhere from a cell phone or a high-end 119 * that the local system might be anywhere from a cell phone or a high-end
120 * audio workstation). Sample counts less than 120 * audio workstation). Sample counts less than
121 * <code>PP_AUDIOMINSAMPLEFRAMECOUNT</code> and greater than 121 * <code>PP_AUDIOMINSAMPLEFRAMECOUNT</code> and greater than
122 * <code>PP_AUDIOMAXSAMPLEFRAMECOUNT</code> are never supported on any 122 * <code>PP_AUDIOMAXSAMPLEFRAMECOUNT</code> are never supported on any
123 * system, but values in between aren't necessarily valid. This function 123 * system, but values in between aren't necessarily valid. This function
124 * will return a supported count closest to the requested value. 124 * will return a supported count closest to the requested frame count.
125 * 125 *
126 * RecommendSampleFrameCount() result is intended for audio output devices. 126 * RecommendSampleFrameCount() result is intended for audio output devices.
127 * 127 *
128 * @param[in] instance 128 * @param[in] instance
129 * @param[in] sample_rate A <code>PP_AudioSampleRate</code> which is either 129 * @param[in] sample_rate A <code>PP_AudioSampleRate</code> which is either
130 * <code>PP_AUDIOSAMPLERATE_44100</code> or 130 * <code>PP_AUDIOSAMPLERATE_44100</code> or
131 * <code>PP_AUDIOSAMPLERATE_48000.</code> 131 * <code>PP_AUDIOSAMPLERATE_48000.</code>
132 * @param[in] requested_sample_frame_count A <code>uint_32t</code> requested 132 * @param[in] requested_sample_frame_count A <code>uint_32t</code> requested
133 * frame count. 133 * frame count.
134 * 134 *
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 * 171 *
172 * @return A <code>uint32_t</code> containing sample frame count or 172 * @return A <code>uint32_t</code> containing sample frame count or
173 * 0 if the resource is invalid. Refer to 173 * 0 if the resource is invalid. Refer to
174 * RecommendSampleFrameCount() for more on sample frame counts. 174 * RecommendSampleFrameCount() for more on sample frame counts.
175 */ 175 */
176 uint32_t (*GetSampleFrameCount)(PP_Resource config); 176 uint32_t (*GetSampleFrameCount)(PP_Resource config);
177 /** 177 /**
178 * RecommendSampleRate() returns the native sample rate that the browser 178 * RecommendSampleRate() returns the native sample rate that the browser
179 * is using in the backend. Applications that use the recommended sample 179 * is using in the backend. Applications that use the recommended sample
180 * rate will have potentially better latency and fidelity. The return value 180 * rate will have potentially better latency and fidelity. The return value
181 * is indended for audio output devices. 181 * is indended for audio output devices. If the output sample rate cannot be
182 * determined, this function can return PP_AUDIOSAMPLERATE_NONE.
182 * 183 *
183 * @param[in] instance 184 * @param[in] instance
184 * 185 *
185 * @return A <code>uint32_t</code> containing the recommended sample frame 186 * @return A <code>uint32_t</code> containing the recommended sample frame
186 * count if successful. 187 * count if successful.
187 */ 188 */
188 PP_AudioSampleRate (*RecommendSampleRate)(PP_Instance instance); 189 PP_AudioSampleRate (*RecommendSampleRate)(PP_Instance instance);
189 }; 190 };
190 191
191 typedef struct PPB_AudioConfig_1_1 PPB_AudioConfig; 192 typedef struct PPB_AudioConfig_1_1 PPB_AudioConfig;
192 193
193 struct PPB_AudioConfig_1_0 { 194 struct PPB_AudioConfig_1_0 {
194 PP_Resource (*CreateStereo16Bit)(PP_Instance instance, 195 PP_Resource (*CreateStereo16Bit)(PP_Instance instance,
195 PP_AudioSampleRate sample_rate, 196 PP_AudioSampleRate sample_rate,
196 uint32_t sample_frame_count); 197 uint32_t sample_frame_count);
197 uint32_t (*RecommendSampleFrameCount)( 198 uint32_t (*RecommendSampleFrameCount)(
198 PP_AudioSampleRate sample_rate, 199 PP_AudioSampleRate sample_rate,
199 uint32_t requested_sample_frame_count); 200 uint32_t requested_sample_frame_count);
200 PP_Bool (*IsAudioConfig)(PP_Resource resource); 201 PP_Bool (*IsAudioConfig)(PP_Resource resource);
201 PP_AudioSampleRate (*GetSampleRate)(PP_Resource config); 202 PP_AudioSampleRate (*GetSampleRate)(PP_Resource config);
202 uint32_t (*GetSampleFrameCount)(PP_Resource config); 203 uint32_t (*GetSampleFrameCount)(PP_Resource config);
203 }; 204 };
204 /** 205 /**
205 * @} 206 * @}
206 */ 207 */
207 208
208 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */ 209 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */
209 210
OLDNEW
« no previous file with comments | « ppapi/api/ppb_audio_config.idl ('k') | ppapi/tests/test_audio.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698