Changeset 2007 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jun 12, 2008 12:48:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r1990 r2007 86 86 87 87 int capture_dev, playback_dev; 88 unsigned capture_lat, playback_lat; 88 89 } app_config; 89 90 … … 195 196 puts (" --capture-dev=id Audio capture device ID (default=-1)"); 196 197 puts (" --playback-dev=id Audio playback device ID (default=-1)"); 198 puts (" --capture-lat=N Audio capture latency, in ms (default=10)"); 199 puts (" --playback-lat=N Audio playback latency, in ms (default=100)"); 197 200 198 201 puts (""); … … 253 256 cfg->capture_dev = PJSUA_INVALID_ID; 254 257 cfg->playback_dev = PJSUA_INVALID_ID; 258 cfg->capture_lat = PJMEDIA_SND_DEFAULT_REC_LATENCY; 259 cfg->playback_lat = PJMEDIA_SND_DEFAULT_PLAY_LATENCY; 255 260 256 261 for (i=0; i<PJ_ARRAY_SIZE(cfg->acc_cfg); ++i) … … 414 419 OPT_TLS_NEG_TIMEOUT, 415 420 OPT_CAPTURE_DEV, OPT_PLAYBACK_DEV, 421 OPT_CAPTURE_LAT, OPT_PLAYBACK_LAT, 416 422 OPT_AUTO_UPDATE_NAT,OPT_USE_COMPACT_FORM,OPT_DIS_CODEC 417 423 }; … … 500 506 { "capture-dev", 1, 0, OPT_CAPTURE_DEV}, 501 507 { "playback-dev", 1, 0, OPT_PLAYBACK_DEV}, 508 { "capture-lat", 1, 0, OPT_CAPTURE_LAT}, 509 { "playback-lat", 1, 0, OPT_PLAYBACK_LAT}, 502 510 { NULL, 0, 0, 0} 503 511 }; … … 1076 1084 case OPT_PLAYBACK_DEV: 1077 1085 cfg->playback_dev = atoi(pj_optarg); 1086 break; 1087 1088 case OPT_CAPTURE_LAT: 1089 cfg->capture_lat = atoi(pj_optarg); 1090 break; 1091 1092 case OPT_PLAYBACK_LAT: 1093 cfg->playback_lat = atoi(pj_optarg); 1078 1094 break; 1079 1095 … … 1472 1488 if (config->playback_dev != PJSUA_INVALID_ID) { 1473 1489 pj_ansi_sprintf(line, "--playback-dev %d\n", config->playback_dev); 1490 pj_strcat2(&cfg, line); 1491 } 1492 1493 /* Sound device latency */ 1494 if (config->capture_lat != PJMEDIA_SND_DEFAULT_REC_LATENCY) { 1495 pj_ansi_sprintf(line, "--capture-lat %d\n", config->capture_lat); 1496 pj_strcat2(&cfg, line); 1497 } 1498 if (config->playback_dev != PJMEDIA_SND_DEFAULT_PLAY_LATENCY) { 1499 pj_ansi_sprintf(line, "--playback-lat %d\n", config->playback_lat); 1474 1500 pj_strcat2(&cfg, line); 1475 1501 } … … 3714 3740 goto on_error; 3715 3741 3742 /* Set sound device latency */ 3743 pjmedia_snd_set_latency(app_config.capture_lat, app_config.playback_lat); 3744 3716 3745 /* Use null sound device? */ 3717 3746 #ifndef STEREO_DEMO
Note: See TracChangeset
for help on using the changeset viewer.