Commit 9b99da88 authored by smorlat's avatar smorlat
Browse files

fix bug in MSVolume

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@513 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent fffcc1d2
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment