Commit b76cf6a5 authored by aymeric's avatar aymeric
Browse files

keep more history in value

let the user choose between linear and db for energy

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@406 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 89d2e587
No related merge requests found
Showing with 2 additions and 2 deletions
...@@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #endif
static const float max_e=(float)32767*32767; static const float max_e=(float)32767*32767;
static const float coef=(float)0.1; static const float coef=(float)0.01;
typedef struct Channel{ typedef struct Channel{
MSBufferizer buff; MSBufferizer buff;
...@@ -400,7 +400,7 @@ static void conf_sum(MSFilter *f, ConfState *s){ ...@@ -400,7 +400,7 @@ static void conf_sum(MSFilter *f, ConfState *s){
en=(s*s*coef) + ((float)1.0-coef)*en; en=(s*s*coef) + ((float)1.0-coef)*en;
} }
chan->energy=en; chan->energy=en;
vol.energy = 10*log10f(chan->energy/max_e); vol.energy = chan->energy; //10*log10f(chan->energy/max_e);
vol.channel = i; vol.channel = i;
ms_filter_notify(f, MS_CONF_CHANNEL_VOLUME, (void*)&vol); ms_filter_notify(f, MS_CONF_CHANNEL_VOLUME, (void*)&vol);
......
Supports Markdown
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