Changeset 319 for pjproject/trunk/pjmedia/include/pjmedia/sound.h
- Timestamp:
- Mar 15, 2006 8:56:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/sound.h
r188 r319 49 49 unsigned default_samples_per_sec;/**< Default sampling rate. */ 50 50 } pj_snd_dev_info; 51 52 /**53 * Sound device parameter, to be specified when calling #pj_snd_open_recorder54 * or #pj_snd_open_player.55 */56 typedef struct pj_snd_stream_info57 {58 unsigned samples_per_sec; /**< Sampling rate. */59 unsigned bits_per_sample; /**< No of bits per sample. */60 unsigned samples_per_frame; /**< No of samples per frame. */61 unsigned bytes_per_frame; /**< No of bytes per frame. */62 unsigned frames_per_packet; /**< No of frames per packet. */63 } pj_snd_stream_info;64 51 65 52 /** … … 135 122 * @return Audio stream, or NULL if failed. 136 123 */ 137 PJ_DECL(pj_snd_stream*) pj_snd_open_recorder(int index, 138 const pj_snd_stream_info *param, 139 pj_snd_rec_cb rec_cb, 140 void *user_data); 124 PJ_DECL(pj_status_t) pj_snd_open_recorder( int index, 125 unsigned clock_rate, 126 unsigned channel_count, 127 unsigned samples_per_frame, 128 unsigned bits_per_sample, 129 pj_snd_rec_cb rec_cb, 130 void *user_data, 131 pj_snd_stream **p_snd_strm); 141 132 142 133 /** … … 151 142 * @return Audio stream, or NULL if failed. 152 143 */ 153 PJ_DECL(pj_snd_stream*) pj_snd_open_player(int index, 154 const pj_snd_stream_info *param, 155 pj_snd_play_cb play_cb, 156 void *user_data); 144 PJ_DECL(pj_status_t) pj_snd_open_player( int index, 145 unsigned clock_rate, 146 unsigned channel_count, 147 unsigned samples_per_frame, 148 unsigned bits_per_sample, 149 pj_snd_play_cb play_cb, 150 void *user_data, 151 pj_snd_stream **p_snd_strm ); 157 152 158 153 /**
Note: See TracChangeset
for help on using the changeset viewer.