- Timestamp:
- Mar 9, 2009 12:55:29 PM (16 years ago)
- Location:
- pjproject/branches/projects/aps-direct/pjmedia
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h
r2489 r2492 65 65 PJMEDIA_AUD_INVALID_DEV = -3 66 66 }; 67 68 69 /**70 * Type for device unique identifier. The unique device ID can be used to save71 * a reference to a particular device across software reboots.72 */73 typedef pj_uint32_t pjmedia_aud_dev_uid;74 67 75 68 … … 187 180 * PJ_FALSE. 188 181 */ 189 PJMEDIA_AUD_DEV_CAP_PLC = 8192 182 PJMEDIA_AUD_DEV_CAP_PLC = 8192, 190 183 184 /** 185 * End of capability 186 */ 187 PJMEDIA_AUD_DEV_CAP_MAX = 16384 188 191 189 } pjmedia_aud_dev_cap; 192 190 … … 370 368 unsigned output_latency_ms; 371 369 370 /** 371 * Input volume setting, in percent. This setting is optional, and will 372 * only be used if PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING is set in 373 * the flags. 374 */ 375 unsigned input_vol; 376 377 /** 378 * Output volume setting, in percent. This setting is optional, and will 379 * only be used if PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING is set in 380 * the flags. 381 */ 382 unsigned output_vol; 383 384 /** 385 * Set the audio input route. This setting is optional, and will only be 386 * used if PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE is set in the flags. 387 */ 388 pjmedia_aud_dev_route input_route; 389 372 390 /** 373 391 * Set the audio output route. This setting is optional, and will only be 374 392 * used if PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE is set in the flags. 375 393 */ 376 pjmedia_aud_dev_route out _route;394 pjmedia_aud_dev_route output_route; 377 395 378 396 /** … … 411 429 typedef struct pjmedia_aud_dev_factory pjmedia_aud_dev_factory; 412 430 431 /** 432 * Get string info for the specified capability. 433 * 434 * @param cap The capability ID. 435 * @param p_desc Optional pointer which will be filled with longer 436 * description about the capability. 437 * 438 * @return Capability name. 439 */ 440 PJ_DECL(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap, 441 const char **p_desc); 442 443 444 /** 445 * Set a capability field value in #pjmedia_aud_param structure. This will 446 * also set the flags field for the specified capability in the structure. 447 * 448 * @param param The structure. 449 * @param cap The audio capability which value is to be set. 450 * @param value Pointer to value. Please see the type of value to 451 * be supplied in the pjmedia_aud_dev_cap documentation. 452 * 453 * @return PJ_SUCCESS on successful operation or the appropriate 454 * error code. 455 */ 456 PJ_DECL(pj_status_t) pjmedia_aud_param_set_cap(pjmedia_aud_param *param, 457 pjmedia_aud_dev_cap cap, 458 const void *pval); 459 460 461 /** 462 * Get a capability field value from #pjmedia_aud_param structure. This 463 * function will return PJMEDIA_EAUD_INVCAP error if the flag for that 464 * capability is not set in the flags field in the structure. 465 * 466 * @param param The structure. 467 * @param cap The audio capability which value is to be retrieved. 468 * @param value Pointer to value. Please see the type of value to 469 * be supplied in the pjmedia_aud_dev_cap documentation. 470 * 471 * @return PJ_SUCCESS on successful operation or the appropriate 472 * error code. 473 */ 474 PJ_DECL(pj_status_t) pjmedia_aud_param_get_cap(const pjmedia_aud_param *param, 475 pjmedia_aud_dev_cap cap, 476 void *pval); 413 477 414 478 /** … … 444 508 */ 445 509 PJ_DECL(pj_status_t) pjmedia_aud_subsys_shutdown(void); 446 447 448 /**449 * Get string info for the specified capability.450 *451 * @param cap The capability ID.452 * @param p_desc Optional pointer which will be filled with longer453 * description about the capability.454 *455 * @return Capability name.456 */457 PJ_DECL(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap,458 const char **p_desc);459 510 460 511 … … 549 600 * @param cap The audio capability which value is to be retrieved. 550 601 * @param value Pointer to value to be filled in by this function 551 * once it returns successfully. 602 * once it returns successfully. Please see the type 603 * of value to be supplied in the pjmedia_aud_dev_cap 604 * documentation. 552 605 * 553 606 * @return PJ_SUCCESS on successful operation or the appropriate … … 563 616 * @param strm The audio stream. 564 617 * @param cap The audio capability which value is to be set. 565 * @param value Pointer to value. 618 * @param value Pointer to value. Please see the type of value to 619 * be supplied in the pjmedia_aud_dev_cap documentation. 566 620 * 567 621 * @return PJ_SUCCESS on successful operation or the appropriate -
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia.h
r2473 r2492 53 53 #include <pjmedia/session.h> 54 54 #include <pjmedia/silencedet.h> 55 /* This sound API is deprecated. Please see:56 http://trac.pjsip.org/repos/wiki/Audio_Dev_API57 */58 #if PJMEDIA_AUDIO_API != PJMEDIA_AUDIO_API_NEW_ONLY59 55 #include <pjmedia/sound.h> 60 #endif61 56 #include <pjmedia/sound_port.h> 62 57 #include <pjmedia/splitcomb.h> -
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia/conference.h
r2460 r2492 43 43 44 44 PJ_BEGIN_DECL 45 46 /** 47 * The conference bridge signature in pjmedia_port_info. 48 */ 49 #define PJMEDIA_CONF_BRIDGE_SIGNATURE \ 50 PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'F') 51 52 /** 53 * The audio switchboard signature in pjmedia_port_info. 54 */ 55 #define PJMEDIA_CONF_SWITCH_SIGNATURE \ 56 PJMEDIA_PORT_SIGNATURE('A', 'S', 'W', 'I') 45 57 46 58 -
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/audiodev.c
r2489 r2492 116 116 } aud_subsys; 117 117 118 /* API: get capability name/info */ 119 PJ_DEF(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap, 120 const char **p_desc) 121 { 122 const char *desc; 123 unsigned i; 124 125 if (p_desc==NULL) p_desc = &desc; 126 127 for (i=0; i<PJ_ARRAY_SIZE(cap_infos); ++i) { 128 if ((1 << i)==cap) 129 break; 130 } 131 132 if (i==32) { 133 *p_desc = "??"; 134 return "??"; 135 } 136 137 *p_desc = cap_infos[i].info; 138 return cap_infos[i].name; 139 } 140 141 static pj_status_t get_cap_pointer(const pjmedia_aud_param *param, 142 pjmedia_aud_dev_cap cap, 143 void **ptr, 144 unsigned *size) 145 { 146 #define FIELD_INFO(name) *ptr = (void*)¶m->name; \ 147 *size = sizeof(param->name) 148 149 switch (cap) { 150 case PJMEDIA_AUD_DEV_CAP_EXT_FORMAT: 151 FIELD_INFO(ext_fmt); 152 break; 153 case PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY: 154 FIELD_INFO(input_latency_ms); 155 break; 156 case PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY: 157 FIELD_INFO(output_latency_ms); 158 break; 159 case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING: 160 FIELD_INFO(input_vol); 161 break; 162 case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING: 163 FIELD_INFO(output_vol); 164 break; 165 case PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE: 166 FIELD_INFO(input_route); 167 break; 168 case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 169 FIELD_INFO(output_route); 170 break; 171 case PJMEDIA_AUD_DEV_CAP_EC: 172 FIELD_INFO(ec_enabled); 173 break; 174 case PJMEDIA_AUD_DEV_CAP_EC_TAIL: 175 FIELD_INFO(ec_tail_ms); 176 break; 177 case PJMEDIA_AUD_DEV_CAP_VAD: 178 FIELD_INFO(ext_fmt.vad); 179 break; 180 case PJMEDIA_AUD_DEV_CAP_CNG: 181 FIELD_INFO(cng_enabled); 182 break; 183 case PJMEDIA_AUD_DEV_CAP_PLC: 184 FIELD_INFO(plc_enabled); 185 break; 186 default: 187 return PJMEDIA_EAUD_INVCAP; 188 } 189 190 #undef FIELD_INFO 191 192 return PJ_SUCCESS; 193 } 194 195 /* API: set cap value to param */ 196 PJ_DEF(pj_status_t) pjmedia_aud_param_set_cap( pjmedia_aud_param *param, 197 pjmedia_aud_dev_cap cap, 198 const void *pval) 199 { 200 void *cap_ptr; 201 unsigned cap_size; 202 pj_status_t status; 203 204 status = get_cap_pointer(param, cap, &cap_ptr, &cap_size); 205 if (status != PJ_SUCCESS) 206 return status; 207 208 pj_memcpy(cap_ptr, pval, cap_size); 209 param->flags |= cap; 210 211 return PJ_SUCCESS; 212 } 213 214 /* API: get cap value from param */ 215 PJ_DEF(pj_status_t) pjmedia_aud_param_get_cap( const pjmedia_aud_param *param, 216 pjmedia_aud_dev_cap cap, 217 void *pval) 218 { 219 void *cap_ptr; 220 unsigned cap_size; 221 pj_status_t status; 222 223 status = get_cap_pointer(param, cap, &cap_ptr, &cap_size); 224 if (status != PJ_SUCCESS) 225 return status; 226 227 if ((param->flags & cap) == 0) { 228 pj_bzero(cap_ptr, cap_size); 229 return PJMEDIA_EAUD_INVCAP; 230 } 231 232 pj_memcpy(pval, cap_ptr, cap_size); 233 return PJ_SUCCESS; 234 } 118 235 119 236 /* Internal: init driver */ … … 292 409 aud_subsys.pf = NULL; 293 410 return PJ_SUCCESS; 294 }295 296 /* API: get capability name/info */297 PJ_DEF(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap,298 const char **p_desc)299 {300 const char *desc;301 unsigned i;302 303 if (p_desc==NULL) p_desc = &desc;304 305 for (i=0; i<PJ_ARRAY_SIZE(cap_infos); ++i) {306 if ((1 << i)==cap)307 break;308 }309 310 if (i==32) {311 *p_desc = "??";312 return "??";313 }314 315 *p_desc = cap_infos[i].info;316 return cap_infos[i].name;317 411 } 318 412 -
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp
r2491 r2492 1206 1206 param->samples_per_frame = af->dev_info.default_samples_per_sec * 20 / 1000; 1207 1207 param->bits_per_sample = BITS_PER_SAMPLE; 1208 param->flags = af->dev_info.caps;1208 param->flags = PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE; 1209 1209 param->ext_fmt.id = PJMEDIA_FORMAT_L16; 1210 param->out _route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE;1210 param->output_route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE; 1211 1211 1212 1212 return PJ_SUCCESS; … … 1301 1301 aps_setting.cng = aps_setting.vad; 1302 1302 aps_setting.loudspk = 1303 strm->param.out _route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;1303 strm->param.output_route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 1304 1304 1305 1305 /* Set audio engine callbacks. */ … … 1376 1376 case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 1377 1377 if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) { 1378 *(pjmedia_aud_dev_route*)pval = strm->param.out _route;1378 *(pjmedia_aud_dev_route*)pval = strm->param.output_route; 1379 1379 status = PJ_SUCCESS; 1380 1380 } … … 1450 1450 } 1451 1451 if (status == PJ_SUCCESS) 1452 strm->param.out _route = r;1452 strm->param.output_route = r; 1453 1453 } 1454 1454 break; -
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/wmme_dev.c
r2489 r2492 48 48 #define THIS_FILE "wmme_dev.c" 49 49 50 51 50 /* WMME device info */ 52 51 struct wmme_dev_info … … 81 80 DWORD dwBufIdx; 82 81 DWORD dwMaxBufIdx; 83 unsigned latency_ms;84 82 pj_timestamp timestamp; 85 83 }; … … 89 87 struct wmme_stream 90 88 { 91 pjmedia_aud_stream base; 92 pjmedia_dir dir; /**< Sound direction. */ 93 int play_id; /**< Playback dev id. */ 94 int rec_id; /**< Recording dev id. */ 89 pjmedia_aud_stream base; /**< Base stream */ 90 pjmedia_aud_param param; /**< Settings */ 95 91 pj_pool_t *pool; /**< Memory pool. */ 96 92 … … 105 101 pjmedia_format_id fmt_id; /**< Frame format */ 106 102 pj_uint8_t silence_char; /**< Silence pattern */ 107 unsigned clock_rate; /**< Clock rate. */108 103 unsigned bytes_per_frame; /**< Bytes per frame */ 109 unsigned samples_per_frame; /**< Samples per frame. */110 unsigned bits_per_sample; /**< Bits per sample. */111 unsigned channel_count; /**< Channel count. */112 104 113 105 pjmedia_frame_ext *xfrm; /**< Extended frame buffer */ … … 438 430 param->samples_per_frame = di->info.default_samples_per_sec * 20 / 1000; 439 431 param->bits_per_sample = 16; 440 param->flags = di->info.caps; 432 param->flags = PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY | 433 PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY; 441 434 param->input_latency_ms = PJMEDIA_SND_DEFAULT_REC_LATENCY; 442 435 param->output_latency_ms = PJMEDIA_SND_DEFAULT_PLAY_LATENCY; … … 498 491 499 492 if (id == PJMEDIA_FORMAT_L16) 500 return " l16";493 return "PCM"; 501 494 pj_memcpy(name, &id, 4); 502 495 name[4] = '\0'; … … 686 679 eventCount = 0; 687 680 events[eventCount++] = strm->thread_quit_event; 688 if (strm-> dir & PJMEDIA_DIR_PLAYBACK)681 if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) 689 682 events[eventCount++] = strm->play_strm.hEvent; 690 if (strm-> dir & PJMEDIA_DIR_CAPTURE)683 if (strm->param.dir & PJMEDIA_DIR_CAPTURE) 691 684 events[eventCount++] = strm->rec_strm.hEvent; 692 685 … … 696 689 */ 697 690 #if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0 698 if (strm-> dir & PJMEDIA_DIR_PLAYBACK)691 if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) 699 692 CeSetThreadPriority(GetCurrentThread(), 153); 700 693 else … … 834 827 if (++wmme_strm->dwBufIdx >= wmme_strm->dwMaxBufIdx) 835 828 wmme_strm->dwBufIdx = 0; 836 wmme_strm->timestamp.u64 += strm-> samples_per_frame /837 strm-> channel_count;829 wmme_strm->timestamp.u64 += strm->param.samples_per_frame / 830 strm->param.channel_count; 838 831 } 839 832 } … … 914 907 strm->xfrm->samples_cnt = 0; 915 908 strm->xfrm->subframe_cnt = 0; 916 pjmedia_frame_ext_append_subframe(strm->xfrm, buffer, 917 strm->bytes_per_frame *8, 918 strm->samples_per_frame); 909 pjmedia_frame_ext_append_subframe( 910 strm->xfrm, buffer, 911 strm->bytes_per_frame *8, 912 strm->param.samples_per_frame 913 ); 919 914 } 920 915 … … 938 933 if (++wmme_strm->dwBufIdx >= wmme_strm->dwMaxBufIdx) 939 934 wmme_strm->dwBufIdx = 0; 940 wmme_strm->timestamp.u64 += strm-> samples_per_frame /941 strm-> channel_count;935 wmme_strm->timestamp.u64 += strm->param.samples_per_frame / 936 strm->param.channel_count; 942 937 } 943 938 } … … 982 977 983 978 strm = PJ_POOL_ZALLOC_T(pool, struct wmme_stream); 984 strm->dir = param->dir; 985 strm->play_id = param->play_id; 986 strm->rec_id = param->rec_id; 979 pj_memcpy(&strm->param, param, sizeof(*param)); 987 980 strm->pool = pool; 988 981 strm->rec_cb = rec_cb; … … 991 984 strm->fmt_id = param->ext_fmt.id; 992 985 strm->silence_char = silence_char; 993 strm->clock_rate = param->clock_rate;994 strm->samples_per_frame = param->samples_per_frame;995 strm->bits_per_sample = param->bits_per_sample;996 strm->channel_count = param->channel_count;997 986 998 987 /* Create player stream */ … … 1000 989 unsigned buf_count; 1001 990 1002 if ( param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY)1003 strm->p lay_strm.latency_ms = param->output_latency_ms;1004 else1005 strm->play_strm.latency_ms = PJMEDIA_SND_DEFAULT_PLAY_LATENCY;1006 1007 buf_count = strm->p lay_strm.latency_ms * param->clock_rate *991 if ((param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY)==0) { 992 strm->param.flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY; 993 strm->param.output_latency_ms = PJMEDIA_SND_DEFAULT_PLAY_LATENCY; 994 } 995 996 buf_count = strm->param.output_latency_ms * param->clock_rate * 1008 997 param->channel_count / param->samples_per_frame / 1000; 1009 998 … … 1024 1013 unsigned buf_count; 1025 1014 1026 if ( param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY)1027 strm-> rec_strm.latency_ms = param->input_latency_ms;1028 else1029 strm->rec_strm.latency_ms = PJMEDIA_SND_DEFAULT_REC_LATENCY;1030 1031 buf_count = strm-> rec_strm.latency_ms * param->clock_rate *1015 if ((param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY)==0) { 1016 strm->param.flags |= PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY; 1017 strm->param.input_latency_ms = PJMEDIA_SND_DEFAULT_REC_LATENCY; 1018 } 1019 1020 buf_count = strm->param.input_latency_ms * param->clock_rate * 1032 1021 param->channel_count / param->samples_per_frame / 1000; 1033 1022 … … 1075 1064 } 1076 1065 1066 /* Apply the remaining settings */ 1067 if (param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING) { 1068 stream_set_cap(&strm->base, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, 1069 ¶m->output_vol); 1070 } 1071 1072 1077 1073 /* Done */ 1078 1074 strm->base.op = &stream_op; … … 1090 1086 PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL); 1091 1087 1092 pj_bzero(pi, sizeof(*pi)); 1093 pi->dir = strm->dir; 1094 pi->play_id = strm->play_id; 1095 pi->rec_id = strm->rec_id; 1096 pi->clock_rate = strm->clock_rate; 1097 pi->channel_count = strm->channel_count; 1098 pi->samples_per_frame = strm->samples_per_frame; 1099 pi->bits_per_sample = strm->bits_per_sample; 1088 pj_memcpy(pi, &strm->param, sizeof(*pi)); 1100 1089 1101 if (pi->dir & PJMEDIA_DIR_CAPTURE) {1102 pi->flags |= PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY;1103 pi->input_latency_ms = strm->rec_strm.latency_ms;1104 }1105 1106 if (pi->dir & PJMEDIA_DIR_PLAYBACK) {1107 /* TODO: report the actual latency? */1108 pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY;1109 pi->output_latency_ms = strm->play_strm.latency_ms;1110 }1111 1112 1090 return PJ_SUCCESS; 1113 1091 } … … 1123 1101 1124 1102 if (cap==PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY && 1125 (strm-> dir & PJMEDIA_DIR_CAPTURE))1103 (strm->param.dir & PJMEDIA_DIR_CAPTURE)) 1126 1104 { 1127 1105 /* Recording latency */ 1128 *(unsigned*)pval = strm-> rec_strm.latency_ms;1106 *(unsigned*)pval = strm->param.input_latency_ms; 1129 1107 return PJ_SUCCESS; 1130 1108 } else if (cap==PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY && 1131 (strm-> dir & PJMEDIA_DIR_PLAYBACK))1109 (strm->param.dir & PJMEDIA_DIR_PLAYBACK)) 1132 1110 { 1133 1111 /* Playback latency */ 1134 *(unsigned*)pval = strm->p lay_strm.latency_ms;1112 *(unsigned*)pval = strm->param.output_latency_ms; 1135 1113 return PJ_SUCCESS; 1136 1114 } else if (cap==PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING && … … 1138 1116 { 1139 1117 /* Output volume setting */ 1140 DWORD dwVol;1118 DWORD waveVol; 1141 1119 MMRESULT mr; 1142 1120 1143 mr = waveOutGetVolume(strm->play_strm.hWave.Out, & dwVol);1121 mr = waveOutGetVolume(strm->play_strm.hWave.Out, &waveVol); 1144 1122 if (mr != MMSYSERR_NOERROR) { 1145 1123 return PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_OUT(mr); 1146 1124 } 1147 1125 1148 dwVol &= 0xFFFF;1149 *(unsigned*)pval = ( dwVol * 100) / 0xFFFF;1126 waveVol &= 0xFFFF; 1127 *(unsigned*)pval = (waveVol * 100) / 0xFFFF; 1150 1128 return PJ_SUCCESS; 1151 1129 } else { … … 1167 1145 { 1168 1146 /* Output volume setting */ 1169 DWORD dwVol; 1147 unsigned vol = *(unsigned*)pval; 1148 DWORD waveVol; 1170 1149 MMRESULT mr; 1171 1172 dwVol = ((*(unsigned*)pval) * 0xFFFF) / 100; 1173 dwVol |= (dwVol << 16); 1174 1175 mr = waveOutSetVolume(strm->play_strm.hWave.Out, dwVol); 1176 return (mr==MMSYSERR_NOERROR)? PJ_SUCCESS : 1150 pj_status_t status; 1151 1152 if (vol > 100) 1153 vol = 100; 1154 1155 waveVol = (vol * 0xFFFF) / 100; 1156 waveVol |= (waveVol << 16); 1157 1158 mr = waveOutSetVolume(strm->play_strm.hWave.Out, waveVol); 1159 status = (mr==MMSYSERR_NOERROR)? PJ_SUCCESS : 1177 1160 PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_OUT(mr); 1161 if (status == PJ_SUCCESS) { 1162 strm->param.output_vol = *(unsigned*)pval; 1163 } 1164 return status; 1178 1165 } 1179 1166 -
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/conf_switch.c
r2472 r2492 46 46 #define THIS_FILE "conf_switch.c" 47 47 48 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('S', 'W', 'T', 'C')48 #define SIGNATURE PJMEDIA_CONF_SWITCH_SIGNATURE 49 49 #define SIGNATURE_PORT PJMEDIA_PORT_SIGNATURE('S', 'W', 'T', 'P') 50 50 #define NORMAL_LEVEL 128 -
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/conference.c
r2468 r2492 65 65 #define BYTES_PER_SAMPLE 2 66 66 67 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('C', 'O', 'N', 'F')67 #define SIGNATURE PJMEDIA_CONF_BRIDGE_SIGNATURE 68 68 #define SIGNATURE_PORT PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'P') 69 69 /* Normal level is hardcodec to 128 in all over places */
Note: See TracChangeset
for help on using the changeset viewer.