$NetBSD: patch-an,v 1.3 2004/07/28 08:05:32 agc Exp $ --- 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=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 #endif -#define DAC_NAME "/dev/dsp" +#ifdef LINUX +# define DAC_NAME "/dev/dsp" +#else /* !LINUX */ +# define DAC_NAME "/dev/audio" +#endif /* LINUX */ #define FRAGMENTS 2 #define FRAGMENT_SIZE 10 @@ -1415,8 +1419,11 @@ if ((audio_fd = open(DAC_NAME,O_RDONLY,0)) == -1) { record_report(rec,"can't open any inputs!"); - if ((errno == EACCES) || (errno == ENOENT)) - record_report(rec,"(to get input in Linux, we need read permission on /dev/dsp)"); + if ((errno == EACCES) || (errno == ENOENT)){ + char buf[256]; + snprintf(buf,256,"(to get input in Linux, we need read permission on %s)",DAC_NAME); + record_report(rec,buf); + } return(-1); } }