Ejemplo n.º 1
0
 /**
  * Create() creates an audio resource. No sound will be heard until
  * StartPlayback() is called. The callback is called with the buffer address
  * and given user data whenever the buffer needs to be filled. From within the
  * callback, you should not call <code>PPB_Audio</code> functions. The
  * callback will be called on a different thread than the one which created
  * the interface. For performance-critical applications (i.e. low-latency
  * audio), the callback should avoid blocking or calling functions that can
  * obtain locks, such as malloc. The layout and the size of the buffer passed
  * to the audio callback will be determined by the device configuration and is
  * specified in the <code>AudioConfig</code> documentation.
  *
  * @param[in] instance A <code>PP_Instance</code> identifying one instance
  * of a module.
  * @param[in] config A <code>PP_Resource</code> corresponding to an audio
  * config resource.
  * @param[in] audio_callback A <code>PPB_Audio_Callback</code> callback
  * function that the browser calls when it needs more samples to play.
  * @param[in] user_data A pointer to user data used in the callback function.
  *
  * @return A <code>PP_Resource</code> containing the audio resource if
  * successful or 0 if the configuration cannot be honored or the callback is
  * null.
  */
 public static PPResource Create(PPInstance instance,
                                 PPResource config,
                                 PPBAudioCallback audio_callback,
                                 IntPtr user_data)
 {
     return(_Create(instance, config, audio_callback, user_data));
 }
Ejemplo n.º 2
0
 extern static PPResource _Create(PPInstance instance,
                                  PPResource config,
                                  PPBAudioCallback audio_callback,
                                  IntPtr user_data);