mirror of https://github.com/mpv-player/mpv
Printing of max volume on exit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8187 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
cce460d88b
commit
3678657416
|
@ -131,6 +131,14 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue