fix bug in MSVolume

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@513 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2009-07-02 13:14:14 +00:00
parent fffcc1d2a2
commit 9b99da8840

View file

@ -268,7 +268,7 @@ static void volume_process(MSFilter *f){
om=allocb(nbytes,0);
ms_bufferizer_read(v->buffer,om->b_wptr,nbytes);
om->b_wptr+=nbytes;
en=update_energy((int16_t*)om->b_rptr,om->b_wptr-om->b_rptr,en);
en=update_energy((int16_t*)om->b_rptr,v->nsamples,en);
volume_agc_process(v,om);
if (v->peer){
@ -282,7 +282,7 @@ static void volume_process(MSFilter *f){
}else{
/*light processing: no agc. Work in place in the input buffer*/
while((m=ms_queue_get(f->inputs[0]))!=NULL){
en=update_energy((int16_t*)m->b_rptr,m->b_wptr-m->b_rptr,en);
en=update_energy((int16_t*)m->b_rptr,(m->b_wptr-m->b_rptr)/2,en);
if (v->peer){
volume_echo_avoider_process(v);
}