pjsip同时进行多路通话, 每路通话都能指定使用不同的mic和喇叭,搞它?
二话不说,抄代码:
HHow can I use multiple sound devices simultaneously?You can use multiple audio devices simultaneously with PJSUA-LIB. The first sound device is managed by PJSUA-LIB as usual, and you access it as slot #0 in the conference bridge. The following steps describe how to open and use the second and subsequent sound devices in your application:Create a sound device port for the sound device you want to use.pjmedia_snd_port *sndport;pj_status_t status;status = pjmedia_snd_port_create(..., &sndport);Create a splitter/combiner port.pjmedia_port *splitcomb;status = pjmedia_splitcomb_create(..., &splitcomb);Create a reverse channel from the splitcomb.pjmedia_port *revch;status = pjmedia_splitcomb_create_rev_channel(pool, splitcomb, 0, 0, &revch);Register the reverse channel above to the conference bridge.int slot;status = pjsua_conf_add_port(pool, revch, &slot);Connect the sound device port to the splitcomb.status = pjmedia_snd_port_connect(sndport, splitcomb);After these, you can use the sound device (that you open in step 1 above) by using the slot number (step 4) just as you would with other media ports. For example, to play a media to the sound device, just connect (with pjsua_conf_connect()) the slot number of that media to the slot number of the sound device, and vice versa.原文链接 https://trac.pjsip.org/repos/wiki/FAQ#multi-snd