Mercurial > mplayer.hg
changeset 8186:b56fd4b1738d
Printing of max volume on exit
author | anders |
---|---|
date | Thu, 14 Nov 2002 09:49:06 +0000 |
parents | aae2d081864a |
children | d9e5b75f9a15 |
files | libaf/af_volume.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libaf/af_volume.c Thu Nov 14 09:47:46 2002 +0000 +++ b/libaf/af_volume.c Thu Nov 14 09:49:06 2002 +0000 @@ -59,7 +59,7 @@ if(in[i]<MIN_VOL) out[i]=0.0; else - out[i]=pow(10.0,clamp(in[i],MIN_VOL,MAX_VOL)/k); + out[i]=pow(10.0,clamp(in[i],MIN_VOL,MAX_VOL)/k); } return AF_OK; } @@ -131,6 +131,14 @@ case AF_CONTROL_VOLUME_ON_OFF: s->onoff = (int)arg; return AF_OK; + case AF_CONTROL_PRE_DESTROY:{ + float m = 0.0; + int i; + for(i=0;i<NCH;i++) + m=max(m,s->maxpower[i]); + af_msg(AF_MSG_INFO,"The maximum volume was %0.2fdB \n",10*log10(m)); + return AF_OK; + } } return AF_UNKNOWN; }