| OLD | NEW |
| 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 Wed Oct 5 14:06:02 2011. */ | 6 /* From ppb_audio_config.idl modified Fri Jan 20 13:12:44 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 * @} | 55 * @} |
| 56 */ | 56 */ |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * @addtogroup Interfaces | 59 * @addtogroup Interfaces |
| 60 * @{ | 60 * @{ |
| 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 16-bit stereo 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_1_0 { | 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 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 86 * <code>buffer16[3]</code> is the second right channel sample. | 86 * <code>buffer16[3]</code> is the second right channel sample. |
| 87 * ... | 87 * ... |
| 88 * <code>buffer16[2 * (sample_frame_count - 1)]</code> is the last left | 88 * <code>buffer16[2 * (sample_frame_count - 1)]</code> is the last left |
| 89 * channel sample. | 89 * channel sample. |
| 90 * <code>buffer16[2 * (sample_frame_count - 1) + 1]</code> is the last | 90 * <code>buffer16[2 * (sample_frame_count - 1) + 1]</code> is the last |
| 91 * right channel sample. | 91 * right channel sample. |
| 92 * Data will always be in the native endian format of the platform. | 92 * Data will always be in the native endian format of the platform. |
| 93 * | 93 * |
| 94 * @param[in] instance A <code>PP_Instance</code> identifying one instance | 94 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 95 * of a module. | 95 * of a module. |
| 96 * @param[in] sample_rate A P<code>P_AudioSampleRate</code> which is either | 96 * @param[in] sample_rate A <code>PP_AudioSampleRate</code> which is either |
| 97 * <code>PP_AUDIOSAMPLERATE_44100</code> or | 97 * <code>PP_AUDIOSAMPLERATE_44100</code> or |
| 98 * <code>PP_AUDIOSAMPLERATE_48000</code>. | 98 * <code>PP_AUDIOSAMPLERATE_48000</code>. |
| 99 * @param[in] sample_frame_count A <code>uint32_t</code> frame count returned | 99 * @param[in] sample_frame_count A <code>uint32_t</code> frame count returned |
| 100 * from the <code>RecommendSampleFrameCount</code> function. | 100 * from the <code>RecommendSampleFrameCount</code> function. |
| 101 * | 101 * |
| 102 * @return A <code>PP_Resource</code> containing the | 102 * @return A <code>PP_Resource</code> containing the |
| 103 * <code>PPB_Audio_Config</code> if successful or a null resource if the | 103 * <code>PPB_Audio_Config</code> if successful or a null resource if the |
| 104 * sample frame count or bit rate are not supported. | 104 * sample frame count or bit rate are not supported. |
| 105 */ | 105 */ |
| 106 PP_Resource (*CreateStereo16Bit)(PP_Instance instance, | 106 PP_Resource (*CreateStereo16Bit)(PP_Instance instance, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 uint32_t (*GetSampleFrameCount)(PP_Resource config); | 169 uint32_t (*GetSampleFrameCount)(PP_Resource config); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 typedef struct PPB_AudioConfig_1_0 PPB_AudioConfig; | 172 typedef struct PPB_AudioConfig_1_0 PPB_AudioConfig; |
| 173 /** | 173 /** |
| 174 * @} | 174 * @} |
| 175 */ | 175 */ |
| 176 | 176 |
| 177 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */ | 177 #endif /* PPAPI_C_PPB_AUDIO_CONFIG_H_ */ |
| 178 | 178 |
| OLD | NEW |