[MPlayer-cvslog] CVS: main/libaf af_volume.c,1.14,1.15

Alex Beregszaszi syncmail at mplayerhq.hu
Mon Jan 31 12:43:38 CET 2005


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libaf
In directory mail:/var2/tmp/cvs-serv18992

Modified Files:
	af_volume.c 
Log Message:
using af_softclip

Index: af_volume.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_volume.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- af_volume.c	27 Dec 2004 17:30:13 -0000	1.14
+++ af_volume.c	31 Jan 2005 11:43:36 -0000	1.15
@@ -177,14 +177,8 @@
 	    s->pow[ch] = t*s->pow[ch] + pow*s->time; // LP filter
 	  /* Soft clipping, the sound of a dream, thanks to Jon Wattes
 	     post to Musicdsp.org */
-	  if(s->soft){
-	    if (x >=  M_PI/2)
-	      x = 1.0;
-	    else if(x <= -M_PI/2)
-	      x = -1.0;
-	    else
-	      x = sin(x);
-	  }
+	  if(s->soft)
+	    x=af_softclip(x);
 	  // Hard clipping
 	  else
 	    x=clamp(x,-1.0,1.0);




More information about the MPlayer-cvslog mailing list