Changeset 2496
- Timestamp:
- Mar 10, 2009 12:07:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjsip/src/pjsua-lib/pjsua_media.c
r2493 r2496 2721 2721 pj_bool_t keep) 2722 2722 { 2723 pj_status_t status; 2724 2723 2725 /* Check if we are allowed to set the cap */ 2724 if ( cap & pjsua_var.aud_svmask) {2726 if ((cap & pjsua_var.aud_svmask) == 0) { 2725 2727 return PJMEDIA_EAUD_INVCAP; 2726 2728 } 2727 2729 2728 if (keep) { 2729 /* Save in internal param for later device open */ 2730 pj_status_t status; 2731 2732 status = pjmedia_aud_param_set_cap(&pjsua_var.aud_param, 2733 cap, pval); 2734 if (status != PJ_SUCCESS) 2735 return status; 2736 } 2737 2730 /* If sound is active, set it immediately */ 2738 2731 if (pjsua_snd_is_active()) { 2739 /* Sound is active, set it immediately */2740 2732 pjmedia_aud_stream *strm; 2741 2733 2742 2734 strm = pjmedia_snd_port_get_snd_stream(pjsua_var.snd_port); 2743 returnpjmedia_aud_stream_set_cap(strm, cap, pval);2735 status = pjmedia_aud_stream_set_cap(strm, cap, pval); 2744 2736 } else { 2745 return PJ_SUCCESS; 2746 } 2737 status = PJ_SUCCESS; 2738 } 2739 2740 if (status != PJ_SUCCESS) 2741 return status; 2742 2743 /* Save in internal param for later device open */ 2744 if (keep) { 2745 status = pjmedia_aud_param_set_cap(&pjsua_var.aud_param, 2746 cap, pval); 2747 } 2748 2749 return status; 2747 2750 } 2748 2751 … … 2757 2760 * volume) 2758 2761 */ 2759 if (pjsua_var.aud_open_cnt==0) 2762 if (pjsua_var.aud_open_cnt==0) { 2763 PJ_LOG(4,(THIS_FILE, "Opening sound device to get initial settings")); 2760 2764 pjsua_set_snd_dev(pjsua_var.cap_dev, pjsua_var.play_dev); 2765 close_snd_dev(); 2766 } 2761 2767 2762 2768 if (pjsua_snd_is_active()) {
Note: See TracChangeset
for help on using the changeset viewer.