summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/pjsua/pjsua_app.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-03-12 18:11:37 +0000
committerBenny Prijono <bennylp@teluu.com>2009-03-12 18:11:37 +0000
commit1dacdee696b7591a6dcc0b3c1d0f41573e473168 (patch)
tree302b09dcd989c0c05cf09f6aebaa63d870b421b9 /pjsip-apps/src/pjsua/pjsua_app.c
parentba9d8ca28eb209571c0bd6a080a8bb03d0fa2d33 (diff)
(Major) Task #737 and #738: integration of APS-Direct and Audiodev from aps-direct branch to trunk.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2506 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/pjsua/pjsua_app.c')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index e7f3390e..5944043f 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -4158,6 +4158,12 @@ pj_status_t app_init(int argc, char *argv[])
app_config.cfg.cb.on_call_replaced = &on_call_replaced;
app_config.cfg.cb.on_nat_detect = &on_nat_detect;
+ /* Set sound device latency */
+ if (app_config.capture_lat > 0)
+ app_config.media_cfg.snd_rec_latency = app_config.capture_lat;
+ if (app_config.playback_lat)
+ app_config.media_cfg.snd_play_latency = app_config.playback_lat;
+
/* Initialize pjsua */
status = pjsua_init(&app_config.cfg, &app_config.log_cfg,
&app_config.media_cfg);
@@ -4423,9 +4429,6 @@ pj_status_t app_init(int argc, char *argv[])
if (status != PJ_SUCCESS)
goto on_error;
- /* Set sound device latency */
- pjmedia_snd_set_latency(app_config.capture_lat, app_config.playback_lat);
-
/* Use null sound device? */
#ifndef STEREO_DEMO
if (app_config.null_audio) {