Changeset 3915
- Timestamp:
- Dec 20, 2011 9:52:19 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/conf_switch.c
r3730 r3915 591 591 } 592 592 593 /* Update master port info shortcut, note that application may update 594 * the master port info when the audio device needs to be reopened with 595 * a new format to match to ports connection format. 596 */ 597 conf->ports[0]->samples_per_frame = PJMEDIA_PIA_SPF(conf->ports[0]->info); 598 593 599 if (i == src_port->listener_cnt) { 594 600 src_port->listener_slots[src_port->listener_cnt] = sink_slot; -
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.