Changeset 2018 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jun 13, 2008 5:01:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2008 r2018 202 202 puts (" --capture-lat=N Audio capture latency, in ms (default=10)"); 203 203 puts (" --playback-lat=N Audio playback latency, in ms (default=100)"); 204 puts (" --snd-auto-close=N Auto close audio device when it is idle for N seconds."); 205 puts (" Specify N=-1 (default) to disable this feature."); 206 puts (" Specify N=0 for instant close when unused."); 204 207 205 208 puts (""); … … 401 404 int option_index; 402 405 enum { OPT_CONFIG_FILE=127, OPT_LOG_FILE, OPT_LOG_LEVEL, OPT_APP_LOG_LEVEL, 403 OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO, 406 OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO, OPT_SND_AUTO_CLOSE, 404 407 OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY, 405 408 OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, … … 515 518 { "stdout-refresh", 1, 0, OPT_STDOUT_REFRESH}, 516 519 { "stdout-refresh-text", 1, 0, OPT_STDOUT_REFRESH_TEXT}, 520 { "snd-auto-close", 1, 0, OPT_SND_AUTO_CLOSE}, 517 521 { NULL, 0, 0, 0} 518 522 }; … … 1107 1111 case OPT_PLAYBACK_LAT: 1108 1112 cfg->playback_lat = atoi(pj_optarg); 1113 break; 1114 1115 case OPT_SND_AUTO_CLOSE: 1116 cfg->media_cfg.snd_auto_close_time = atoi(pj_optarg); 1109 1117 break; 1110 1118 … … 1503 1511 if (config->playback_dev != PJSUA_INVALID_ID) { 1504 1512 pj_ansi_sprintf(line, "--playback-dev %d\n", config->playback_dev); 1513 pj_strcat2(&cfg, line); 1514 } 1515 if (config->media_cfg.snd_auto_close_time != -1) { 1516 pj_ansi_sprintf(line, "--snd-auto-close %d\n", 1517 config->media_cfg.snd_auto_close_time); 1505 1518 pj_strcat2(&cfg, line); 1506 1519 } … … 3787 3800 #endif 3788 3801 3789 if (app_config.capture_dev != PJSUA_INVALID_ID 3790 || app_config.playback_dev != PJSUA_INVALID_ID) { 3791 status 3792 = pjsua_set_snd_dev(app_config.capture_dev, app_config.playback_dev); 3802 if (app_config.capture_dev != PJSUA_INVALID_ID || 3803 app_config.playback_dev != PJSUA_INVALID_ID) 3804 { 3805 status = pjsua_set_snd_dev(app_config.capture_dev, 3806 app_config.playback_dev); 3793 3807 if (status != PJ_SUCCESS) 3794 3808 goto on_error;
Note: See TracChangeset
for help on using the changeset viewer.