| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 Mon Aug 29 10:11:34 2011. */ | 6 /* From ppb_audio_config.idl modified Wed Oct 5 14:06:02 2011. */ |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 */ | 61 */ |
| 62 /** | 62 /** |
| 63 * The <code>PPB_AudioConfig</code> interface contains pointers to several | 63 * The <code>PPB_AudioConfig</code> interface contains pointers to several |
| 64 * functions for establishing your audio configuration within the browser. | 64 * functions for establishing your audio configuration within the browser. |
| 65 * This interface only supports stereo * 16bit output. | 65 * This interface only supports stereo * 16bit output. |
| 66 * | 66 * |
| 67 * Refer to the | 67 * Refer to the |
| 68 * <a href="/chrome/nativeclient/docs/audio.html">Pepper | 68 * <a href="/chrome/nativeclient/docs/audio.html">Pepper |
| 69 * Audio API</a> for information on using this interface. | 69 * Audio API</a> for information on using this interface. |
| 70 */ | 70 */ |
| 71 struct PPB_AudioConfig { | 71 struct PPB_AudioConfig_1_0 { |
| 72 /** | 72 /** |
| 73 * CreateStereo16bit() creates a 16 bit audio configuration resource. The | 73 * CreateStereo16bit() creates a 16 bit audio configuration resource. The |
| 74 * <code>sample_frame_count</code> should be the result of calling | 74 * <code>sample_frame_count</code> should be the result of calling |
| 75 * <code>RecommendSampleFrameCount</code>. If the sample frame count or bit | 75 * <code>RecommendSampleFrameCount</code>. If the sample frame count or bit |
| 76 * rate isn't supported, this function will fail and return a null resource. | 76 * rate isn't supported, this function will fail and return a null resource. |
| 77 * | 77 * |
| 78 * A single sample frame on a stereo device means one value for the left | 78 * A single sample frame on a stereo device means one value for the left |
| 79 * channel and one value for the right channel. | 79 * channel and one value for the right channel. |
| 80 * | 80 * |
| 81 * Buffer layout for a stereo int16 configuration: | 81 * Buffer layout for a stereo int16 configuration: |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 * | 161 * |
| 162 * @param[in] config A <code>PP_Resource</code> corresponding to an audio | 162 * @param[in] config A <code>PP_Resource</code> corresponding to an audio |
| 163 * config resource. | 163 * config resource. |
| 164 * | 164 * |
| 165 * @return A <code>uint32_t</code> containing sample frame count or | 165 * @return A <code>uint32_t</code> containing sample frame count or |
| 166 * 0 if the resource is invalid. Refer to | 166 * 0 if the resource is invalid. Refer to |
| 167 * RecommendSampleFrameCount() for more on sample frame counts. | 167 * RecommendSampleFrameCount() for more on sample frame counts. |
| 168 */ | 168 */ |
| 169 uint32_t (*GetSampleFrameCount)(PP_Resource config); | 169 uint32_t (*GetSampleFrameCount)(PP_Resource config); |
| 170 }; | 170 }; |
| 171 |
| 172 typedef struct PPB_AudioConfig_1_0 PPB_AudioConfig; |
| 171 /** | 173 /** |
| 172 * @} | 174 * @} |
| 173 */ | 175 */ |
| 174 | 176 |
| 175 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */ | 177 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */ |
| 176 | 178 |
| OLD | NEW |