Changeset 312 for pjproject/trunk/pjmedia/src/pjmedia/conference.c
- Timestamp:
- Mar 8, 2006 12:37:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r279 r312 128 128 struct pjmedia_conf 129 129 { 130 unsigned options; /**< Bitmask options. */ 130 131 unsigned max_ports; /**< Maximum ports. */ 131 132 unsigned port_cnt; /**< Current number of ports. */ … … 334 335 unsigned samples_per_frame, 335 336 unsigned bits_per_sample, 337 unsigned options, 336 338 pjmedia_conf **p_conf ) 337 339 { … … 352 354 PJ_ASSERT_RETURN(conf->ports, PJ_ENOMEM); 353 355 356 conf->options = options; 354 357 conf->max_ports = max_ports; 355 358 conf->clock_rate = clock_rate; … … 386 389 static pj_status_t create_sound( pjmedia_conf *conf ) 387 390 { 388 /* Open recorder. */ 389 conf->snd_rec = pj_snd_open_recorder(-1 ,&conf->snd_info, &rec_cb, conf); 390 if (conf->snd_rec == NULL) { 391 return -1; 391 /* Open recorder only if mic is not disabled. */ 392 if ((conf->options & PJMEDIA_CONF_NO_MIC) == 0) { 393 conf->snd_rec = pj_snd_open_recorder(-1 ,&conf->snd_info, 394 &rec_cb, conf); 395 if (conf->snd_rec == NULL) { 396 return -1; 397 } 392 398 } 393 399 … … 395 401 conf->snd_player = pj_snd_open_player(-1, &conf->snd_info, &play_cb, conf); 396 402 if (conf->snd_player == NULL) { 397 pj_snd_stream_close(conf->snd_rec); 403 if (conf->snd_rec) { 404 pj_snd_stream_close(conf->snd_rec); 405 } 398 406 return -1; 399 407 } … … 426 434 pj_status_t status; 427 435 428 if (conf->snd_ rec== NULL) {436 if (conf->snd_player == NULL) { 429 437 status = create_sound(conf); 430 438 if (status != PJ_SUCCESS)
Note: See TracChangeset
for help on using the changeset viewer.