mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 12:36:25 +00:00
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
This commit is contained in:
parent
89d2e5878e
commit
b76cf6a54e
1 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif
|
||||
|
||||
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{
|
||||
MSBufferizer buff;
|
||||
|
|
@ -400,7 +400,7 @@ static void conf_sum(MSFilter *f, ConfState *s){
|
|||
en=(s*s*coef) + ((float)1.0-coef)*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;
|
||||
ms_filter_notify(f, MS_CONF_CHANNEL_VOLUME, (void*)&vol);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue