Changeset 4748
- Timestamp:
- Feb 18, 2014 1:41:45 AM (11 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 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 -
pjproject/trunk/third_party/bdsound/include/bdimad.h
r4432 r4748 52 52 * - <b>Usage</b> 53 53 * \n There are only a couple of things the customer have to pay attention on 54 * §when using bdIMAD library.54 * ï¿œwhen using bdIMAD library. 55 55 * 56 56 * - <b>Initialization</b> … … 341 341 } bdIMADpj_libVersion_t; 342 342 343 344 /** 345 * @brief Audio output routing setting to pass to set and get route output device functions. 346 */ 347 typedef enum bdIMADpj_out_dev_route{ 348 /** Default route. */ 349 BD_AUD_DEV_ROUTE_DEFAULT = 0, 350 351 /** Route to loudspeaker */ 352 BD_AUD_DEV_ROUTE_LOUDSPEAKER = 1, 353 354 /** Route to earpiece */ 355 BD_AUD_DEV_ROUTE_EARPIECE = 2 356 }bdIMADpj_out_dev_route; 357 358 343 359 /** 344 360 * @} … … 409 425 * is modified with the applied settings. 410 426 * @param[out] **ppWarningMessages Pointer to pointer to a 411 * ::bdIMADpj_Warnings_t s ructure,427 * ::bdIMADpj_Warnings_t structure, 412 428 * which reports the warnings after the 413 429 * initialization. … … 514 530 * performed successfully, otherwise 515 531 * return an error (refer to 516 * §::bdIMADpj_Status).532 * ï¿œ::bdIMADpj_Status). 517 533 */ 518 534 BDIMADPJ_API bdIMADpj_Status bdIMADpj_setParameter(bdIMADpj bdIMADInstance, … … 537 553 bdIMADpj_Parameter parameterName, void *pValue); 538 554 555 /** 556 * @brief Is used to set the route of the output device of the bdIMAD object pointed by the 557 * <code>pBdIMADInstance</code>. 558 * @param[in] bdIMADInstance bdIMAD object. 559 * @param[in] outputRoute Indicate the route of the output device to set. 560 * @param[out] **ppWarningMessages Pointer to pointer to a 561 * ::bdIMADpj_Warnings_t structure, 562 * which reports the warnings after the 563 * set function. 564 * @return ::BD_PJ_OK if the function has been 565 * performed successfully, otherwise return 566 * an error (refer to ::bdIMADpj_Status). 567 */ 568 BDIMADPJ_API bdIMADpj_Status bdIMADpj_setRouteOutputDevice(bdIMADpj bdIMADInstance, bdIMADpj_out_dev_route outputRoute, bdIMADpj_Warnings_t **ppWarningMessages); 569 570 /** 571 * @brief Is used to get the route of the output device of the bdIMAD object pointed by the 572 * <code>pBdIMADInstance</code>. 573 * @param[in] bdIMADInstance bdIMAD object. 574 * @param[out] *outputRoute Is a pointer to the route of the output device currently setted. 575 * @return ::BD_PJ_OK if the function has been 576 * performed successfully, otherwise return 577 * an error (refer to ::bdIMADpj_Status). 578 */ 579 BDIMADPJ_API bdIMADpj_Status bdIMADpj_getRouteOutputDevice(bdIMADpj bdIMADInstance, bdIMADpj_out_dev_route *outputRoute); 539 580 540 581 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.