Changeset 765
- Timestamp:
- Oct 11, 2006 9:56:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r763 r765 971 971 const pjmedia_snd_dev_info *cap_info, *play_info; 972 972 unsigned clock_rates[] = { 0, 22050, 44100, 48000, 11025, 32000, 8000}; 973 unsigned selected_clock_rate = 0; 973 974 unsigned i; 974 975 pj_status_t status = -1; … … 999 1000 16, 0, &pjsua_var.snd_port); 1000 1001 1001 if (status == PJ_SUCCESS) 1002 if (status == PJ_SUCCESS) { 1003 selected_clock_rate = clock_rates[i]; 1002 1004 break; 1005 } 1003 1006 1004 1007 pj_strerror(status, errmsg, sizeof(errmsg)); 1005 PJ_LOG(4, ( "..failed: %s", errmsg));1008 PJ_LOG(4, (THIS_FILE, "..failed: %s", errmsg)); 1006 1009 } 1007 1010 … … 1019 1022 pjsua_var.media_cfg.ec_tail_len, 1020 1023 pjsua_var.media_cfg.ec_options); 1024 1025 /* If there's mismatch between sound port and conference's port, 1026 * create a resample port to bridge them. 1027 */ 1028 if (selected_clock_rate != pjsua_var.media_cfg.clock_rate) { 1029 pjmedia_port *resample_port; 1030 1031 status = pjmedia_resample_port_create(pjsua_var.pool, conf_port, 1032 selected_clock_rate, 0, 1033 &resample_port); 1034 if (status != PJ_SUCCESS) { 1035 pjsua_perror("Error creating resample port", THIS_FILE, status); 1036 return status; 1037 } 1038 1039 conf_port = resample_port; 1040 } 1021 1041 1022 1042 /* Connect sound port to the bridge */
Note: See TracChangeset
for help on using the changeset viewer.