Index: pjproject/trunk/pjmedia/include/pjmedia/sound.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 320)
+++ pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 321)
@@ -37,10 +37,10 @@
 
 /** Opaque data type for audio stream. */
-typedef struct pj_snd_stream pj_snd_stream;
-
-/**
- * Device information structure returned by #pj_snd_get_dev_info.
- */
-typedef struct pj_snd_dev_info
+typedef struct pjmedia_snd_stream pjmedia_snd_stream;
+
+/**
+ * Device information structure returned by #pjmedia_snd_get_dev_info.
+ */
+typedef struct pjmedia_snd_dev_info
 {
     char	name[64];	        /**< Device name.		    */
@@ -48,5 +48,5 @@
     unsigned	output_count;	        /**< Max number of output channels. */
     unsigned	default_samples_per_sec;/**< Default sampling rate.	    */
-} pj_snd_dev_info;
+} pjmedia_snd_dev_info;
 
 /** 
@@ -63,5 +63,5 @@
  * @return		Non-zero to stop the stream.
  */
-typedef pj_status_t (*pj_snd_play_cb)(/* in */   void *user_data,
+typedef pj_status_t (*pjmedia_snd_play_cb)(/* in */   void *user_data,
 				      /* in */   pj_uint32_t timestamp,
 				      /* out */  void *output,
@@ -79,5 +79,5 @@
  * @return		Non-zero to stop the stream.
  */
-typedef pj_status_t (*pj_snd_rec_cb)(/* in */   void *user_data,
+typedef pj_status_t (*pjmedia_snd_rec_cb)(/* in */   void *user_data,
 				     /* in */   pj_uint32_t timestamp,
 				     /* in */   const void *input,
@@ -91,5 +91,5 @@
  * @return		Zero on success.
  */
-PJ_DECL(pj_status_t) pj_snd_init(pj_pool_factory *factory);
+PJ_DECL(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory);
 
 
@@ -99,5 +99,5 @@
  * @return		Number of devices.
  */
-PJ_DECL(int) pj_snd_get_dev_count(void);
+PJ_DECL(int) pjmedia_snd_get_dev_count(void);
 
 
@@ -106,7 +106,7 @@
  *
  * @param index		The index of the device, which should be in the range
- *			from zero to #pj_snd_get_dev_count - 1.
- */
-PJ_DECL(const pj_snd_dev_info*) pj_snd_get_dev_info(unsigned index);
+ *			from zero to #pjmedia_snd_get_dev_count - 1.
+ */
+PJ_DECL(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index);
 
 
@@ -114,40 +114,55 @@
  * Create a new audio stream for audio capture purpose.
  *
- * @param index		Device index, or -1 to let the library choose the first
- *			available device, or -2 to use NULL device.
- * @param param		Stream parameters.
- * @param rec_cb	Callback to handle captured audio samples.
- * @param user_data	User data to be associated with the stream.
- *
- * @return		Audio stream, or NULL if failed.
- */
-PJ_DECL(pj_status_t) pj_snd_open_recorder( int index,
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param rec_cb	    Callback to handle captured audio samples.
+ * @param user_data	    User data to be associated with the stream.
+ * @param p_snd_strm	    Pointer to receive the stream instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_open_recorder( int index,
 					   unsigned clock_rate,
 					   unsigned channel_count,
 					   unsigned samples_per_frame,
 					   unsigned bits_per_sample,
-					   pj_snd_rec_cb rec_cb,
+					   pjmedia_snd_rec_cb rec_cb,
 					   void *user_data,
-					   pj_snd_stream **p_snd_strm);
+					   pjmedia_snd_stream **p_snd_strm);
 
 /**
  * Create a new audio stream for playing audio samples.
  *
- * @param index		Device index, or -1 to let the library choose the first
- *			available device, or -2 to use NULL device.
- * @param param		Stream parameters.
- * @param play_cb	Callback to supply audio samples.
- * @param user_data	User data to be associated with the stream.
- *
- * @return		Audio stream, or NULL if failed.
- */
-PJ_DECL(pj_status_t) pj_snd_open_player( int index,
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param play_cb	    Callback to be called when the sound player needs
+ *			    more audio samples to play.
+ * @param user_data	    User data to be associated with the stream.
+ * @param p_snd_strm	    Pointer to receive the stream instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_open_player( int index,
 					 unsigned clock_rate,
 					 unsigned channel_count,
 					 unsigned samples_per_frame,
 					 unsigned bits_per_sample,
-					 pj_snd_play_cb play_cb,
+					 pjmedia_snd_play_cb play_cb,
 					 void *user_data,
-					 pj_snd_stream **p_snd_strm );
+					 pjmedia_snd_stream **p_snd_strm );
 
 /**
@@ -158,5 +173,5 @@
  * @return		Zero on success.
  */
-PJ_DECL(pj_status_t) pj_snd_stream_start(pj_snd_stream *stream);
+PJ_DECL(pj_status_t) pjmedia_snd_stream_start(pjmedia_snd_stream *stream);
 
 /**
@@ -167,5 +182,5 @@
  * @return		Zero on success.
  */
-PJ_DECL(pj_status_t) pj_snd_stream_stop(pj_snd_stream *stream);
+PJ_DECL(pj_status_t) pjmedia_snd_stream_stop(pjmedia_snd_stream *stream);
 
 /**
@@ -176,5 +191,5 @@
  * @return		Zero on success.
  */
-PJ_DECL(pj_status_t) pj_snd_stream_close(pj_snd_stream *stream);
+PJ_DECL(pj_status_t) pjmedia_snd_stream_close(pjmedia_snd_stream *stream);
 
 /**
@@ -183,5 +198,5 @@
  * @return		Zero on success.
  */
-PJ_DECL(pj_status_t) pj_snd_deinit(void);
+PJ_DECL(pj_status_t) pjmedia_snd_deinit(void);
 
 
