pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/snd audio/snd uses its own round() function, inc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/26da1f3eacae
branches:  trunk
changeset: 478672:26da1f3eacae
user:      agc <agc%pkgsrc.org@localhost>
date:      Wed Jul 28 08:05:32 2004 +0000

description:
audio/snd uses its own round() function, incompatible with the one in
math.h in -current - work around this.

XXX still statfs problems in -current in this package.

diffstat:

 audio/snd/distinfo         |   9 +++++-
 audio/snd/patches/patch-an |  17 ++++++++++--
 audio/snd/patches/patch-ao |  13 +++++++++
 audio/snd/patches/patch-ap |  13 +++++++++
 audio/snd/patches/patch-aq |  26 +++++++++++++++++++
 audio/snd/patches/patch-ar |  62 ++++++++++++++++++++++++++++++++++++++++++++++
 audio/snd/patches/patch-as |  12 ++++++++
 7 files changed, 147 insertions(+), 5 deletions(-)

diffs (191 lines):

diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/distinfo
--- a/audio/snd/distinfo        Wed Jul 28 07:37:19 2004 +0000
+++ b/audio/snd/distinfo        Wed Jul 28 08:05:32 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2002/09/21 01:02:04 jlam Exp $
+$NetBSD: distinfo,v 1.6 2004/07/28 08:05:32 agc Exp $
 
 SHA1 (snd.tar.gz) = cb48922170602f30553b604bda039974c1706b65
 Size (snd.tar.gz) = 735422 bytes
@@ -15,4 +15,9 @@
 SHA1 (patch-ak) = 8732fd50e181bf02db4b7e63d2464f71e44e2f1e
 SHA1 (patch-al) = 7edd5495f5caf1c82c1a43db78e3b2e54adb4ca3
 SHA1 (patch-am) = 46955a9e33ceefdb88871e7f32443c839a46138c
-SHA1 (patch-an) = c87c0aedd14a54307293939b1fd103b61fe2b4a2
+SHA1 (patch-an) = 4498dff116f9394767ba6e8f06670b549e4fce5b
+SHA1 (patch-ao) = 67b88decbf4b8b4c3c00a4edccd26df89ba1755f
+SHA1 (patch-ap) = 1416ab82eca6a907920ef876b2e54fd51425650a
+SHA1 (patch-aq) = 574db781f41d3689325d1fe7b3ae95b76ab9650f
+SHA1 (patch-ar) = 838ff0663e7b6aebfa09223a66f445b49f6f0e97
+SHA1 (patch-as) = 6ee5137a2e6703b95b41849836fcaa4ed091ec36
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-an
--- a/audio/snd/patches/patch-an        Wed Jul 28 07:37:19 2004 +0000
+++ b/audio/snd/patches/patch-an        Wed Jul 28 08:05:32 2004 +0000
@@ -1,7 +1,18 @@
-$NetBSD: patch-an,v 1.2 1998/08/07 10:36:11 agc Exp $
+$NetBSD: patch-an,v 1.3 2004/07/28 08:05:32 agc Exp $
 
---- snd.orig/snd-xrec.c        Mon Feb  2 15:01:06 1998
-+++ snd-xrec.c Sun Feb 22 02:23:01 1998
+--- snd-xrec.c.orig    1998-02-02 14:01:06.000000000 +0000
++++ snd-xrec.c 2004-07-28 09:01:33.000000000 +0100
+@@ -134,8 +134,8 @@
+               {
+                 for (j=0;j<by0;j++)
+                   {
+-                    inx = tx + round((x+(float)i/xscl)*matrix[0] + (y+(float)j/yscl)*matrix[2]);  if (inx<0) inx=0; if (inx>=nwidth) inx=nwidth-1;
+-                    iny = ty + round((x+(float)i/xscl)*matrix[1] + (y+(float)j/yscl)*matrix[3]);  if (iny<0) iny=0; if (iny>=nheight) iny=nheight-1;
++                    inx = tx + snd_round((x+(float)i/xscl)*matrix[0] + (y+(float)j/yscl)*matrix[2]);  if (inx<0) inx=0; if (inx>=nwidth) inx=nwidth-1;
++                    iny = ty + snd_round((x+(float)i/xscl)*matrix[1] + (y+(float)j/yscl)*matrix[3]);  if (iny<0) iny=0; if (iny>=nheight) iny=nheight-1;
+                     XPutPixel(after,inx,iny,px);
+                   }
+               }
 @@ -1314,7 +1314,11 @@
    #include <soundcard.h>
  #endif
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snd/patches/patch-ao        Wed Jul 28 08:05:32 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1 2004/07/28 08:05:32 agc Exp $
+
+--- snd-1.h    2004/07/28 07:54:48     1.1
++++ snd-1.h    2004/07/28 07:55:08
+@@ -474,7 +474,7 @@
+ char *sound_type(int type);
+ char *sound_format (int format);
+ char *copy_string (char *str);
+-int round(float x);
++int snd_round(float x);
+ void snd_error (char *msg);
+ char *filename_without_home_directory(char *name);
+ char *just_filename(char *name);
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snd/patches/patch-ap        Wed Jul 28 08:05:32 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1 2004/07/28 08:05:32 agc Exp $
+
+--- snd-snd.c  2004/07/28 07:57:26     1.1
++++ snd-snd.c  2004/07/28 07:58:29
+@@ -668,7 +668,7 @@
+       break;
+     case SPEED_AS_SEMITONE: 
+       /* find closest semitone to val */
+-      semi = round(log(val)*((float)tones/log(2.0)));
++      semi = snd_round(log(val)*((float)tones/log(2.0)));
+       /* space until (-) num (-52 to 52 is its range if 12-tone) */
+       for (i=0;i<3;i++) srcbuf[i] = ' '; 
+       sprintf(src_txt_buf,"%d",semi);
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-aq
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snd/patches/patch-aq        Wed Jul 28 08:05:32 2004 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-aq,v 1.1 2004/07/28 08:05:32 agc Exp $
+
+--- snd-xenv.c 2004/07/28 07:57:26     1.1
++++ snd-xenv.c 2004/07/28 07:57:56
+@@ -278,8 +278,8 @@
+   int cols,rows,i,j,width,height,x,y,k;
+   if (all_envs_top > 1)
+     {
+-      cols = round(sqrt((float)(all_envs_top * env_window_width) / (float)env_window_height));
+-      rows = round((float)all_envs_top/(float)cols);
++      cols = snd_round(sqrt((float)(all_envs_top * env_window_width) / (float)env_window_height));
++      rows = snd_round((float)all_envs_top/(float)cols);
+       if ((rows*cols) < all_envs_top) rows++;
+     }
+   else
+@@ -312,8 +312,8 @@
+       return(0);
+       else
+       {
+-        cols = round(sqrt((float)(all_envs_top * env_window_width) / (float)env_window_height));
+-        rows = round((float)all_envs_top/(float)cols);
++        cols = snd_round(sqrt((float)(all_envs_top * env_window_width) / (float)env_window_height));
++        rows = snd_round((float)all_envs_top/(float)cols);
+         if ((rows*cols) < all_envs_top) rows++;
+         width = (int)((float)env_window_width/(float)cols);
+         height = (int)((float)env_window_height/(float)rows);
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-ar
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snd/patches/patch-ar        Wed Jul 28 08:05:32 2004 +0000
@@ -0,0 +1,62 @@
+$NetBSD: patch-ar,v 1.1 2004/07/28 08:05:32 agc Exp $
+
+--- snd-xsnd.c 2004/07/28 07:57:26     1.1
++++ snd-xsnd.c 2004/07/28 07:58:15
+@@ -429,10 +429,10 @@
+     val = 0;
+   else
+     {
+-      val = round(amp / (float)(SCROLLBAR_LINEAR_MULT));
++      val = snd_round(amp / (float)(SCROLLBAR_LINEAR_MULT));
+       if (val > SCROLLBAR_LINEAR_MAX)
+       {
+-        val = round((log(amp)*((float)SCROLLBAR_MAX*.2)) + SCROLLBAR_MID);
++        val = snd_round((log(amp)*((float)SCROLLBAR_MAX*.2)) + SCROLLBAR_MID);
+       }
+     }
+   return(val);
+@@ -501,7 +501,7 @@
+ int snd_srate_to_int(float val)
+ {
+   if (val > 0.0)
+-    return(round(450.0 + 150.0 * log(val)));
++    return(snd_round(450.0 + 150.0 * log(val)));
+   else return(0);
+ }
+ 
+@@ -556,7 +556,7 @@
+ {
+   int val;
+   val = ep/.0009697;
+-  if (val>100) val = round(450+150*log(ep));
++  if (val>100) val = snd_round(450+150*log(ep));
+   return(val);
+ }
+ 
+@@ -623,7 +623,7 @@
+ 
+ int snd_contrast_to_int(float val)
+ {
+-  return(round(val*10));
++  return(snd_round(val*10));
+ }
+ 
+ void snd_contrast_changed(snd_info *sp, int val)
+@@ -688,7 +688,7 @@
+ 
+ int snd_revscl_to_int(float val)
+ {
+-  return(round(pow(val,0.333)*60.0));
++  return(snd_round(pow(val,0.333)*60.0));
+ }
+ 
+ void snd_revscl_changed(snd_info *sp, int val)
+@@ -751,7 +751,7 @@
+ 
+ int snd_revlen_to_int(float val)
+ {
+-  return(round(val*20.0));
++  return(snd_round(val*20.0));
+ }
+ 
+ void snd_revlen_changed(snd_info *sp, int val)
diff -r ffa7bf350987 -r 26da1f3eacae audio/snd/patches/patch-as
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snd/patches/patch-as        Wed Jul 28 08:05:32 2004 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-as,v 1.1 2004/07/28 08:05:32 agc Exp $
+
+--- snd-utils.c        2004/07/28 07:57:26     1.1
++++ snd-utils.c        2004/07/28 07:58:23
+@@ -1,6 +1,6 @@
+ #include "snd.h"
+ 
+-int round(float x)
++int snd_round(float x)
+ {
+   int i;
+   i=x;



Home | Main Index | Thread Index | Old Index