From 1c09cc1ebe804e6c35f6767f044f858941f2ad24 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 8 Feb 2007 18:01:53 +0000 Subject: Fixed bug #94: wrong level adjustment calculation in conference bridge git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@937 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/pjmedia/conference.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pjmedia/src') diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c index 317c355a..b5ef7ec8 100644 --- a/pjmedia/src/pjmedia/conference.c +++ b/pjmedia/src/pjmedia/conference.c @@ -1728,7 +1728,9 @@ static pj_status_t get_frame(pjmedia_port *this_port, else if (itemp < -32768) itemp = -32768; input[j] = (pj_int16_t) itemp; - level += itemp; + + if (itemp >=0 ) level += itemp; + else level -= itemp; } level /= conf->samples_per_frame; -- cgit v1.2.3