Hi nanang Thanks for your link. I had do some testing this week. But at my testing(local LAN), the latency is high when both calling and callee use conf bridge for normal call handling. I know default value of sound device record/playback latency is 100ms. If conf bridge don't add more latency, I think total latency wouldn't reach 300 ms for one way conversion at my local LAN. But at my testing we found latency is high. There must be somewhere add more latency besides sound device. So I reduce sound device and conf bridge ptime to 10ms, and change sound device record/play back latency to 40 ms. PJMEDIA_SOUND_BUFFER_COUNT still 6. The reduce of latency is quite obvious. I thought there maybe some latency caused by bridge.If this isn't true, why only 120 ms latency reduced by sound device will let us see impressed result. Yes, the best answer is to learn conference bridge source code. But there will be helpful advice from your experts to make it clear. ------ config_site.h ------------ #define PJMEDIA_SOUND_IMPLEMENTATION PJMEDIA_SOUND_PORTAUDIO_SOUND #define PJMEDIA_PREFER_DIRECT_SOUND 0 #define PJMEDIA_SND_DEFAULT_REC_LATENCY 40 #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 40 #define PJMEDIA_SOUND_USE_DELAYBUF 0 #define PJMEDIA_SOUND_BUFFER_COUNT 6 At all testing, we are using G729 codec at ptime 20ms. OS is windows XP. And VS 2005. regards, Gang On Fri, Jul 18, 2008 at 12:30 AM, Nanang Izzuddin <nanang at pjsip.org> wrote: > Hi Gang Lau, > > > 2008/7/17 Gang Lau <gangban.lau at gmail.com>: > > Hi, > > I have some questions about conference bridge when play with pjsipua. > > > > If we want to create a four party audio conference, is it needed to > > connect all channels each other? > > > > connect(0, 1); > > connect(0, 2); > > connect(0, 3); > > connect(1, 0); > > ... > > connect(1,3); > > connect(2,0); > > ... > > connect(2,3); > > ... > > connect(3,2); > > > > or just all the ports connected to port zero and port zero connected > to > > all ports is enough. > > You have to connect all channels each other. Port zero is just a > participant as the other stream ports, it doesn't do the mixing, the > conference bridge does. > > > > > And it seems pjsipua create conference bridge by default, even for a > > simple call. > > Yes, assumed you are using PJSUA, there is no pjsipua. > > > The conference bridge has 120ms(buffer size 6 * ptime 20 ms) > latency.A > > simple call will be total 240ms latency caused by > > both side bridge. Is it true? > > How could I reduce latency for pjsipua? > > > > No, it isn't true :) > The buffer size you point there should be PJMEDIA_SOUND_BUFFER_COUNT. > Please see please see > http://trac.pjsip.org/repos/wiki/FAQ#audio-latency about buffer size > meaning. The link also gives info about how to reduce latency. > > Regards, > nanang > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080718/9df514f3/attachment.html