- Timestamp:
- Feb 5, 2009 10:59:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia/sound.h
r2394 r2438 92 92 unsigned play_latency; /**< Playback latency, in samples. */ 93 93 } pjmedia_snd_stream_info; 94 95 96 /** 97 * Stream setting for opening sound device with non-PCM data. 98 */ 99 typedef struct pjmedia_snd_setting 100 { 101 pjmedia_fourcc format; /**< Format (FourCC ID). */ 102 pj_uint32_t bitrate; /**< Bitrate (bps). */ 103 pj_uint32_t mode; /**< Mode, e.g: iLBC format has 104 20ms or 30ms frame size. */ 105 pj_bool_t plc; /**< PLC enabled/disabled. */ 106 pj_bool_t vad; /**< VAD enabled/disabled. */ 107 pj_bool_t cng; /**< CNG enabled/disabled. */ 108 pj_bool_t loudspk; /**< Audio routed to loudspeaker. */ 109 } pjmedia_snd_setting; 94 110 95 111 … … 274 290 275 291 /** 292 * Create sound stream for capturing audio and/or audio playback, from the 293 * same device. This also allows opening sound stream with extended settings, 294 * e.g: stream format, see #pjmedia_snd_setting. 295 * 296 * @param dir Sound stream direction. 297 * @param rec_id Device index for recorder/capture stream, or 298 * -1 to use the first capable device. 299 * @param play_id Device index for playback stream, or -1 to use 300 * the first capable device. 301 * @param clock_rate Sound device's clock rate to set. 302 * @param channel_count Set number of channels, 1 for mono, or 2 for 303 * stereo. The channel count determines the format 304 * of the frame. 305 * @param samples_per_frame Number of samples per frame. 306 * @param bits_per_sample Set the number of bits per sample. The normal 307 * value for this parameter is 16 bits per sample. 308 * @param rec_cb Callback to handle captured audio samples. 309 * @param play_cb Callback to be called when the sound player needs 310 * more audio samples to play. 311 * @param user_data User data to be associated with the stream. 312 * @param setting Sound device extended setting. 313 * @param p_snd_strm Pointer to receive the stream instance. 314 * 315 * @return PJ_SUCCESS on success. 316 */ 317 PJ_DECL(pj_status_t) pjmedia_snd_open2( pjmedia_dir dir, 318 int rec_id, 319 int play_id, 320 unsigned clock_rate, 321 unsigned channel_count, 322 unsigned samples_per_frame, 323 unsigned bits_per_sample, 324 pjmedia_snd_rec_cb rec_cb, 325 pjmedia_snd_play_cb play_cb, 326 void *user_data, 327 const pjmedia_snd_setting *setting, 328 pjmedia_snd_stream **p_snd_strm); 329 330 331 /** 276 332 * Get information about live stream. 277 333 *
Note: See TracChangeset
for help on using the changeset viewer.