[Mplayer-cvslog] CVS: main/libaf af_volume.c,1.4,1.5

Anders Johansson CVS anders at mplayerhq.hu
Thu Nov 14 10:49:11 CET 2002


Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv30193/libaf

Modified Files:
	af_volume.c 
Log Message:
Printing of max volume on exit

Index: af_volume.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_volume.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- af_volume.c	12 Nov 2002 12:33:54 -0000	1.4
+++ af_volume.c	14 Nov 2002 09:49:06 -0000	1.5
@@ -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;
 }




More information about the MPlayer-cvslog mailing list