Index: ppapi/c/ppb_audio_config.h |
=================================================================== |
--- ppapi/c/ppb_audio_config.h (revision 118765) |
+++ ppapi/c/ppb_audio_config.h (working copy) |
@@ -3,7 +3,7 @@ |
* found in the LICENSE file. |
*/ |
-/* From ppb_audio_config.idl modified Wed Oct 5 14:06:02 2011. */ |
+/* From ppb_audio_config.idl modified Wed Jan 11 13:41:09 2012. */ |
#ifndef PPAPI_C_PPB_AUDIO_CONFIG_H_ |
#define PPAPI_C_PPB_AUDIO_CONFIG_H_ |
@@ -15,7 +15,8 @@ |
#include "ppapi/c/pp_stdint.h" |
#define PPB_AUDIO_CONFIG_INTERFACE_1_0 "PPB_AudioConfig;1.0" |
-#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_1_0 |
+#define PPB_AUDIO_CONFIG_INTERFACE_1_1 "PPB_AudioConfig;1.1" |
+#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_1_1 |
/** |
* @file |
@@ -68,7 +69,7 @@ |
* <a href="/chrome/nativeclient/docs/audio.html">Pepper |
* Audio API</a> for information on using this interface. |
*/ |
-struct PPB_AudioConfig_1_0 { |
+struct PPB_AudioConfig_1_1 { |
/** |
* CreateStereo16bit() creates a 16 bit audio configuration resource. The |
* <code>sample_frame_count</code> should be the result of calling |
@@ -120,6 +121,7 @@ |
* system, but values in between aren't necessarily valid. This function |
* will return a supported count closest to the requested value. |
* |
+ * @param[in] instance |
* @param[in] sample_rate A <code>PP_AudioSampleRate</code> which is either |
* <code>PP_AUDIOSAMPLERATE_44100</code> or |
* <code>PP_AUDIOSAMPLERATE_48000.</code> |
@@ -130,6 +132,7 @@ |
* count if successful. |
*/ |
uint32_t (*RecommendSampleFrameCount)( |
+ PP_Instance instance, |
PP_AudioSampleRate sample_rate, |
uint32_t requested_sample_frame_count); |
/** |
@@ -167,9 +170,32 @@ |
* RecommendSampleFrameCount() for more on sample frame counts. |
*/ |
uint32_t (*GetSampleFrameCount)(PP_Resource config); |
+ /** |
+ * RecommendSampleRate() returns the native sample rate that the browser |
+ * is using in the backend. Applications that use the recommended sample |
+ * rate will have potentially better latency and fidelity. |
+ * |
+ * @param[in] instance |
+ * |
+ * @return A <code>uint32_t</code> containing the recommended sample frame |
+ * count if successful. |
+ */ |
+ PP_AudioSampleRate (*RecommendSampleRate)(PP_Instance instance); |
}; |
-typedef struct PPB_AudioConfig_1_0 PPB_AudioConfig; |
+typedef struct PPB_AudioConfig_1_1 PPB_AudioConfig; |
+ |
+struct PPB_AudioConfig_1_0 { |
+ PP_Resource (*CreateStereo16Bit)(PP_Instance instance, |
+ PP_AudioSampleRate sample_rate, |
+ uint32_t sample_frame_count); |
+ uint32_t (*RecommendSampleFrameCount)( |
+ PP_AudioSampleRate sample_rate, |
+ uint32_t requested_sample_frame_count); |
+ PP_Bool (*IsAudioConfig)(PP_Resource resource); |
+ PP_AudioSampleRate (*GetSampleRate)(PP_Resource config); |
+ uint32_t (*GetSampleFrameCount)(PP_Resource config); |
+}; |
/** |
* @} |
*/ |