diff options
author | agc <agc@pkgsrc.org> | 2004-07-28 08:05:32 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2004-07-28 08:05:32 +0000 |
commit | 4c64dcfc1411ca697ded45cb2d5a775728a6a8c3 (patch) | |
tree | 4a96ff1fed97da9a3535bad915409056a0a41e7b /audio/snd/patches | |
parent | e7d2deb1708211c5e132d2ac9195eaa83bd8ea3e (diff) | |
download | pkgsrc-4c64dcfc1411ca697ded45cb2d5a775728a6a8c3.tar.gz |
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 (limited to 'audio/snd/patches')
-rw-r--r-- | audio/snd/patches/patch-an | 17 | ||||
-rw-r--r-- | audio/snd/patches/patch-ao | 13 | ||||
-rw-r--r-- | audio/snd/patches/patch-ap | 13 | ||||
-rw-r--r-- | audio/snd/patches/patch-aq | 26 | ||||
-rw-r--r-- | audio/snd/patches/patch-ar | 62 | ||||
-rw-r--r-- | audio/snd/patches/patch-as | 12 |
6 files changed, 140 insertions, 3 deletions
diff --git a/audio/snd/patches/patch-an b/audio/snd/patches/patch-an index 5fb0c8a3c28..7fb54979cb9 100644 --- a/audio/snd/patches/patch-an +++ b/audio/snd/patches/patch-an @@ -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 --git a/audio/snd/patches/patch-ao b/audio/snd/patches/patch-ao new file mode 100644 index 00000000000..929a98b9ba8 --- /dev/null +++ b/audio/snd/patches/patch-ao @@ -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 --git a/audio/snd/patches/patch-ap b/audio/snd/patches/patch-ap new file mode 100644 index 00000000000..7ee8e2fe107 --- /dev/null +++ b/audio/snd/patches/patch-ap @@ -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 --git a/audio/snd/patches/patch-aq b/audio/snd/patches/patch-aq new file mode 100644 index 00000000000..fa1f593da6d --- /dev/null +++ b/audio/snd/patches/patch-aq @@ -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 --git a/audio/snd/patches/patch-ar b/audio/snd/patches/patch-ar new file mode 100644 index 00000000000..04a1e111c07 --- /dev/null +++ b/audio/snd/patches/patch-ar @@ -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 --git a/audio/snd/patches/patch-as b/audio/snd/patches/patch-as new file mode 100644 index 00000000000..1ff4ada894c --- /dev/null +++ b/audio/snd/patches/patch-as @@ -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; |