diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-02-01 19:25:50 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-02-01 19:25:50 +0000 |
commit | 3838854d1becf6befefe1efb9112f5db5e0c6740 (patch) | |
tree | 3b9aaba9a0905f23457e0545c047d43701ede476 /pjsip/src | |
parent | 7de461f8212c9fc77ae3580fd1a2f40ba5ec0ffb (diff) |
Implement the missing pjsua_get_snd_dev() function
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@925 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index c78d5050..a32bd3eb 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -1242,6 +1242,25 @@ PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev, /* + * Get currently active sound devices. If sound devices has not been created + * (for example when pjsua_start() is not called), it is possible that + * the function returns PJ_SUCCESS with -1 as device IDs. + */ +PJ_DEF(pj_status_t) pjsua_get_snd_dev(int *capture_dev, + int *playback_dev) +{ + if (capture_dev) { + *capture_dev = pjsua_var.cap_dev; + } + if (playback_dev) { + *playback_dev = pjsua_var.play_dev; + } + + return PJ_SUCCESS; +} + + +/* * Use null sound device. */ PJ_DEF(pj_status_t) pjsua_set_null_snd_dev(void) |