[svn-commits] branch file/coremedia - r7318 /team/file/coremedia/shims/shim_volume.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Dec 3 16:43:56 CST 2005


Author: file
Date: Sat Dec  3 16:43:55 2005
New Revision: 7318

URL: http://svn.digium.com/view/asterisk?rev=7318&view=rev
Log:
Oops change it so you can decrease the volume properly

Modified:
    team/file/coremedia/shims/shim_volume.c

Modified: team/file/coremedia/shims/shim_volume.c
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/shims/shim_volume.c?rev=7318&r1=7317&r2=7318&view=diff
==============================================================================
--- team/file/coremedia/shims/shim_volume.c (original)
+++ team/file/coremedia/shims/shim_volume.c Sat Dec  3 16:43:55 2005
@@ -66,7 +66,7 @@
   /* Okay here is where it gets complicated */
   for (i=0; i<frame->datalen; i++) {
     if (0 > pvt->volume)
-      s[i] = s[i] / (short)pvt->volume;
+      s[i] = s[i] / (short)abs(pvt->volume);
     else
       s[i] = s[i] * (short)pvt->volume;
   }
@@ -100,7 +100,7 @@
 
 	/* Take argument and use it as the volume */
 	if (data != NULL)
-	  new_pvt->volume = abs(atoi(data));
+	  new_pvt->volume = atoi(data);
 	else
 	  new_pvt->volume = 1; /* Assume no change */
 



More information about the svn-commits mailing list