- Timestamp:
- Mar 4, 2009 5:23:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjsip/src/pjsua-lib/pjsua_media.c
r2480 r2486 2385 2385 int playback_dev) 2386 2386 { 2387 #if PJMEDIA_CONF_USE_SWITCH_BOARD 2388 2389 pjmedia_aud_param param; 2390 pj_status_t status; 2391 2392 /* Create default parameters for the device */ 2393 status = pjmedia_aud_dev_default_param(capture_dev, ¶m); 2394 if (status != PJ_SUCCESS) { 2395 pjsua_perror(THIS_FILE, "Error retrieving default audio " 2396 "device parameters", status); 2397 return status; 2398 } 2399 param.dir = PJMEDIA_DIR_CAPTURE_PLAYBACK; 2400 param.rec_id = capture_dev; 2401 param.play_id = playback_dev; 2402 param.channel_count = pjsua_var.media_cfg.channel_count; 2403 /* Latency settings */ 2404 param.flags |= (PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY | 2405 PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY); 2406 param.input_latency_ms = pjsua_var.media_cfg.snd_rec_latency; 2407 param.output_latency_ms = pjsua_var.media_cfg.snd_play_latency; 2408 /* EC settings */ 2409 if (pjsua_var.media_cfg.ec_tail_len) { 2410 param.flags |= (PJMEDIA_AUD_DEV_CAP_EC | PJMEDIA_AUD_DEV_CAP_EC_TAIL); 2411 param.ec_enabled = PJ_TRUE; 2412 param.ec_tail_ms = pjsua_var.media_cfg.ec_tail_len; 2413 } else { 2414 param.flags &= ~(PJMEDIA_AUD_DEV_CAP_EC | PJMEDIA_AUD_DEV_CAP_EC_TAIL); 2415 } 2416 2417 return open_snd_dev_ext(¶m); 2418 2419 #else 2420 2387 2421 pjmedia_port *conf_port; 2388 2422 pjmedia_aud_dev_info play_info; … … 2548 2582 2549 2583 return PJ_SUCCESS; 2584 2585 #endif /* PJMEDIA_CONF_USE_SWITCH_BOARD */ 2586 2550 2587 } 2551 2588
Note: See TracChangeset
for help on using the changeset viewer.