- Timestamp:
- Feb 18, 2014 1:41:45 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-audiodev/bdimad_dev.c
r4501 r4748 319 319 wf->dev_info[captureDeviceCount+i].deviceId = captureDeviceCount+i; 320 320 wf->dev_info[captureDeviceCount+i].info.caps = 321 PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING ;321 PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING | PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE; 322 322 wf->dev_info[captureDeviceCount+i].info.default_samples_per_sec = 323 323 BD_IMAD_DEFAULT_FREQ; … … 426 426 } 427 427 428 if(di->info.caps & PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE) { 429 param->output_route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 430 } 431 428 432 return PJ_SUCCESS; 429 433 } … … 928 932 } 929 933 934 if(cap == PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE) { 935 pjmedia_aud_dev_route outputRoute = *(pjmedia_aud_dev_route*)pval; 936 if(strm->param.output_route!=outputRoute) 937 res = bdIMADpj_setRouteOutputDevice(strm->bdIMADpjInstance, (bdIMADpj_out_dev_route) outputRoute, &strm->bdIMADpjWarningPtr); 938 if(res == BD_PJ_OK) { 939 strm->param.output_route = outputRoute; 940 return PJ_SUCCESS; 941 } else { 942 return PJMEDIA_AUDIODEV_ERRNO_FROM_BDIMAD(res); 943 } 944 } 945 930 946 return PJMEDIA_EAUD_INVCAP; 931 947 } … … 1012 1028 } 1013 1029 1030 if(param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE) { 1031 stream_set_capBDIMAD(&strm->base, 1032 PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 1033 ¶m->output_route); 1034 } 1035 1014 1036 strm->base.op = &stream_op; 1015 1037 *p_aud_strm = &strm->base; … … 1060 1082 { 1061 1083 pi->flags |= PJMEDIA_AUD_DEV_CAP_EC; 1084 } 1085 if(stream_get_cap(s, PJMEDIA_AUD_DEV_CAP_EC, &pi->ec_enabled) == PJ_SUCCESS) 1086 { 1087 pi->flags |= PJMEDIA_AUD_DEV_CAP_EC; 1088 } 1089 1090 1091 // Get the Route Output Device setting 1092 if(stream_get_cap(s, PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, &pi->output_route) == PJ_SUCCESS) 1093 { 1094 pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE; 1062 1095 } 1063 1096 … … 1114 1147 return PJMEDIA_AUDIODEV_ERRNO_FROM_BDIMAD(res); 1115 1148 } 1149 } 1150 else if(cap == PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE) { 1151 pjmedia_aud_dev_route routeOutDev; 1152 res = bdIMADpj_getRouteOutputDevice(strm->bdIMADpjInstance,(bdIMADpj_out_dev_route*)&routeOutDev); 1153 if(res == BD_PJ_OK) { 1154 *(pjmedia_aud_dev_route*)pval = routeOutDev; 1155 return PJ_SUCCESS; 1156 } else { 1157 return PJMEDIA_AUDIODEV_ERRNO_FROM_BDIMAD(res); 1158 } 1116 1159 } else { 1117 1160 return PJMEDIA_EAUD_INVCAP; … … 1177 1220 1178 1221 #if defined (_MSC_VER) 1222 #ifdef _DEBUG 1223 #pragma comment ( lib, "bdClientValidationd.lib" ) 1224 #pragma comment ( lib, "bdIMADpjd.lib" ) 1225 #else 1179 1226 #pragma comment ( lib, "bdClientValidation.lib" ) 1180 1227 #pragma comment ( lib, "bdIMADpj.lib" ) 1181 1228 #endif 1229 #endif 1182 1230 1183 1231
Note: See TracChangeset
for help on using the changeset viewer.