Changeset 3915 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Dec 20, 2011 9:52:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r3909 r3915 3718 3718 */ 3719 3719 if (pjsua_var.is_mswitch) { 3720 pj_memcpy(&conf_port->info.fmt, ¶m->base.ext_fmt, 3721 sizeof(conf_port->info.fmt)); 3722 conf_port->info.fmt.det.aud.clock_rate = param->base.clock_rate; 3723 conf_port->info.fmt.det.aud.frame_time_usec = param->base.samples_per_frame* 3724 1000000 / 3725 param->base.clock_rate; 3726 conf_port->info.fmt.det.aud.channel_count = param->base.channel_count; 3727 conf_port->info.fmt.det.aud.bits_per_sample = 16; 3720 if (param->base.flags & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT) { 3721 conf_port->info.fmt = param->base.ext_fmt; 3722 } else { 3723 unsigned bps, ptime_usec; 3724 bps = param->base.clock_rate * param->base.bits_per_sample; 3725 ptime_usec = param->base.samples_per_frame / 3726 param->base.channel_count * 1000000 / 3727 param->base.clock_rate; 3728 pjmedia_format_init_audio(&conf_port->info.fmt, 3729 PJMEDIA_FORMAT_PCM, 3730 param->base.clock_rate, 3731 param->base.channel_count, 3732 param->base.bits_per_sample, 3733 ptime_usec, 3734 bps, bps); 3735 } 3728 3736 } 3729 3737
Note: See TracChangeset
for help on using the changeset viewer.