BIG refactoring in pjsua_media.c:
- switchboard/conf detection is done at run-time, removing #ifdefs
- use one function, open_snd_dev() to open device
- use one function, create_aud_param() to initialize
audio parameters:
- get the default from device
- override with user settings previously done with
pjsua_snd_set_setting() (new API)
- added new API to set/get sound device settings. The settings are
semi permanent, it will be used for future opening of sound dev:
- pjsua_snd_set_setting()
- pjsua_snd_get_setting()
- snd_auto_close_time default value changed to 1 (from -1)
- both pjsua_enum_snd_devs() and pjsua_enum_aud_devs() API are now
supported (previously it was done with #ifdef).
- make_call() will not open the sound device is switchboard is
used
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2493 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index a4af71b..a144c97 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -272,8 +272,15 @@
pjmedia_endpt *med_endpt; /**< Media endpoint. */
pjsua_conf_setting mconf_cfg; /**< Additionan conf. bridge. param */
pjmedia_conf *mconf; /**< Conference bridge. */
- int cap_dev; /**< Capture device ID. */
- int play_dev; /**< Playback device ID. */
+ pj_bool_t is_mswitch;/**< Are we using audio switchboard
+ (a.k.a APS-Direct) */
+
+ /* Sound device */
+ pjmedia_aud_dev_index cap_dev; /**< Capture device ID. */
+ pjmedia_aud_dev_index play_dev; /**< Playback device ID. */
+ pj_uint32_t aud_svmask;/**< Which settings to save */
+ pjmedia_aud_param aud_param; /**< User settings to sound dev */
+ pj_bool_t aud_open_cnt;/**< How many # device is opened */
pj_bool_t no_snd; /**< No sound (app will manage it) */
pj_pool_t *snd_pool; /**< Sound's private pool. */
pjmedia_snd_port *snd_port; /**< Sound port. */