Changeset 5677 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c
- Timestamp:
- Oct 27, 2017 6:30:50 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c
r5676 r5677 24 24 25 25 #define THIS_FILE "pjsua_aud.c" 26 #define NULL_SND_DEV_ID -9927 26 28 27 /***************************************************************************** … … 881 880 882 881 if (need_reopen) { 883 if (pjsua_var.cap_dev != NULL_SND_DEV_ID) {882 if (pjsua_var.cap_dev != PJSUA_SND_NULL_DEV) { 884 883 pjmedia_snd_port_param param; 885 884 … … 1728 1727 1729 1728 /* Check if NULL sound device is used */ 1730 if ( NULL_SND_DEV_ID==param->base.rec_id ||1731 NULL_SND_DEV_ID==param->base.play_id)1729 if (PJSUA_SND_NULL_DEV==param->base.rec_id || 1730 PJSUA_SND_NULL_DEV==param->base.play_id) 1732 1731 { 1733 1732 return pjsua_set_null_snd_dev(); … … 1736 1735 /* Close existing sound port */ 1737 1736 close_snd_dev(); 1737 1738 /* Save the device IDs */ 1739 pjsua_var.cap_dev = param->base.rec_id; 1740 pjsua_var.play_dev = param->base.play_id; 1738 1741 1739 1742 /* Notify app */ … … 1853 1856 } 1854 1857 1855 /* Save the device IDs */1856 pjsua_var.cap_dev = param->base.rec_id;1857 pjsua_var.play_dev = param->base.play_id;1858 1859 1858 /* Update sound device name. */ 1860 1859 { … … 2010 2009 2011 2010 /* Null-sound */ 2012 if (snd_param->capture_dev == NULL_SND_DEV_ID&&2013 snd_param->playback_dev == NULL_SND_DEV_ID)2011 if (snd_param->capture_dev == PJSUA_SND_NULL_DEV && 2012 snd_param->playback_dev == PJSUA_SND_NULL_DEV) 2014 2013 { 2015 2014 PJSUA_UNLOCK(); … … 2130 2129 close_snd_dev(); 2131 2130 2131 pjsua_var.cap_dev = PJSUA_SND_NULL_DEV; 2132 pjsua_var.play_dev = PJSUA_SND_NULL_DEV; 2133 2132 2134 /* Notify app */ 2133 2135 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { … … 2162 2164 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 2163 2165 2164 pjsua_var.cap_dev = NULL_SND_DEV_ID;2165 pjsua_var.play_dev = NULL_SND_DEV_ID;2166 2167 2166 pjsua_var.no_snd = PJ_FALSE; 2168 2167 pjsua_var.snd_is_on = PJ_TRUE; … … 2185 2184 close_snd_dev(); 2186 2185 pjsua_var.no_snd = PJ_TRUE; 2186 pjsua_var.cap_dev = PJSUA_SND_NO_DEV; 2187 pjsua_var.play_dev = PJSUA_SND_NO_DEV; 2187 2188 2188 2189 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.