summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorscw <scw>1999-12-04 12:56:29 +0000
committerscw <scw>1999-12-04 12:56:29 +0000
commit2c0cc1a401e505de5df8f3024879ab24513ff76f (patch)
treef2382136a276dd5a6ba0f9bb291ad300ddb60518 /audio
parent5e819b4e5013999e805611416546da94f0c75a85 (diff)
downloadpkgsrc-2c0cc1a401e505de5df8f3024879ab24513ff76f.tar.gz
Digital audio recording and processing package.
Diffstat (limited to 'audio')
-rw-r--r--audio/dap/Makefile20
-rw-r--r--audio/dap/files/md53
-rw-r--r--audio/dap/files/patch-sum19
-rw-r--r--audio/dap/patches/patch-aa13
-rw-r--r--audio/dap/patches/patch-ab13
-rw-r--r--audio/dap/patches/patch-ac56
-rw-r--r--audio/dap/patches/patch-ad13
-rw-r--r--audio/dap/patches/patch-ae13
-rw-r--r--audio/dap/patches/patch-af13
-rw-r--r--audio/dap/patches/patch-ag435
-rw-r--r--audio/dap/patches/patch-ah58
-rw-r--r--audio/dap/patches/patch-ai47
-rw-r--r--audio/dap/patches/patch-aj204
-rw-r--r--audio/dap/patches/patch-ak88
-rw-r--r--audio/dap/patches/patch-al15
-rw-r--r--audio/dap/patches/patch-am284
-rw-r--r--audio/dap/patches/patch-an15
-rw-r--r--audio/dap/patches/patch-ao13
-rw-r--r--audio/dap/patches/patch-ap13
-rw-r--r--audio/dap/patches/patch-aq13
-rw-r--r--audio/dap/pkg/COMMENT1
-rw-r--r--audio/dap/pkg/DESCR125
-rw-r--r--audio/dap/pkg/PLIST2
23 files changed, 1476 insertions, 0 deletions
diff --git a/audio/dap/Makefile b/audio/dap/Makefile
new file mode 100644
index 00000000000..e07e54b7b46
--- /dev/null
+++ b/audio/dap/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/12/04 12:56:29 scw Exp $
+
+DISTNAME= DAPSource
+PKGNAME= dap-2.0.2
+WRKSRC= ${WRKDIR}/dap
+CATEGORIES= audio
+MASTER_SITES= http://www.cee.hw.ac.uk/~richardk/
+
+MAINTAINER= scw@netbsd.org
+HOMEPAGE= http://www.cee.hw.ac.uk/~richardk/
+
+DEPENDS+= xforms-0.88:../../x11/xforms
+
+MAKEFILE= Makefile.netbsd
+ONLY_FOR_PLATFORM= *-*-alpha *-*-arm32 *-*-i386 *-*-m68k *-*-sparc *-*-ns32k
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/main/DAP ${PREFIX}/bin/dap
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/dap/files/md5 b/audio/dap/files/md5
new file mode 100644
index 00000000000..e85435a41c6
--- /dev/null
+++ b/audio/dap/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/12/04 12:56:33 scw Exp $
+
+MD5 (DAPSource.tar.gz) = 971561d3e26f30db398d51b6b3d8d018
diff --git a/audio/dap/files/patch-sum b/audio/dap/files/patch-sum
new file mode 100644
index 00000000000..fc3485eaf87
--- /dev/null
+++ b/audio/dap/files/patch-sum
@@ -0,0 +1,19 @@
+$NetBSD: patch-sum,v 1.1.1.1 1999/12/04 12:56:33 scw Exp $
+
+MD5 (patch-aa) = 119b5ff3512575e0410a184fcbfcf7a6
+MD5 (patch-ab) = db83062b634ed6bb0ca8033675482f02
+MD5 (patch-ac) = ce79d1f0fd19906c17d7a4abbd7a5516
+MD5 (patch-ad) = a21e26c0ed1a66141a218e69a1f1dba3
+MD5 (patch-ae) = 144deebf5367bb90146a20ca920dbb1b
+MD5 (patch-af) = f4029ab90106f6bc664c58c5945922f8
+MD5 (patch-ag) = 6f071a820c7f582d8c63551966d1925a
+MD5 (patch-ah) = 3ee00c149bb30e675670ec18f05209f7
+MD5 (patch-ai) = aea84ce054b9577a07e38227feac372a
+MD5 (patch-aj) = 7090c746f3882ebaf6c706b3e0701cd4
+MD5 (patch-ak) = 01fc8fb77e6fd9a274be273829b8d6b5
+MD5 (patch-al) = 65f4da3f6af47d7c405f5f9de2b1520a
+MD5 (patch-am) = 02fa084ef2c7720de536a93785a6e20f
+MD5 (patch-an) = d79e543ea8ce46a5d7b93cc264f515ee
+MD5 (patch-ao) = 60be15c314e56997a6d3bf177b4fe37f
+MD5 (patch-ap) = b705f96a4d5bfcd65c46ea3f3221c8c2
+MD5 (patch-aq) = 5d70ee1680b30dc526b7ce60bb594fab
diff --git a/audio/dap/patches/patch-aa b/audio/dap/patches/patch-aa
new file mode 100644
index 00000000000..fc9e1250ffa
--- /dev/null
+++ b/audio/dap/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/12/04 12:56:30 scw Exp $
+
+--- main/Makefile.netbsd.orig Thu Nov 11 01:17:08 1999
++++ main/Makefile.netbsd Fri Dec 3 21:31:57 1999
+@@ -12,7 +12,7 @@
+ INCDIR = -I. -I.. -I$(SOUND) -I$(SPKIT) -I$(FORMS) -I$(TOOLTIP) -I$(X11DIR)/include -I$(X11DIR)/include/X11
+ LIBDIR = -L$(SPKIT)/spkit -L$(FORMS) -L$(AUDIO) -L$(AUDIOF) -L$(TOOLTIP) -L$(X11DIR)/lib
+ CCFLAGS = $(INCDIR) $(DEBUG) $(OPTIM) -DLINUX -DBIGENDIAN -DUSINGGCC -Wall
+-DEBUG = -g3
++DEBUG = #-g3
+ OPTIM = -O1
+ LDFLAGS = $(LIBDIR) -ldsp -laudio -laudiofile -ltooltips -lforms -lXpm -lX11 -lm -lossaudio
+
diff --git a/audio/dap/patches/patch-ab b/audio/dap/patches/patch-ab
new file mode 100644
index 00000000000..ea42318188c
--- /dev/null
+++ b/audio/dap/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- sound/Makefile.netbsd.orig Mon Nov 15 13:28:16 1999
++++ sound/Makefile.netbsd Fri Dec 3 21:35:18 1999
+@@ -10,7 +10,7 @@
+ INCDIR = -I. -I.. -I$(SPKIT) -I$(MAINDIR)
+ LIBDIR = -L$(SPKIT)/spkit -L$(AUDIO) -L$(AUDIOF)
+ CCFLAGS = $(DEBUG) $(OPTIM) -DNOFORMS -DLINUX -DBIGENDIAN -DUSINGGCC -Wall
+-DEBUG = -g3
++DEBUG = #-g3
+ OPTIM = -O1
+ LDFLAGS = $(LIBDIR) -laudio -laudiofile -lm -lossaudio
+
diff --git a/audio/dap/patches/patch-ac b/audio/dap/patches/patch-ac
new file mode 100644
index 00000000000..e676066726e
--- /dev/null
+++ b/audio/dap/patches/patch-ac
@@ -0,0 +1,56 @@
+$NetBSD: patch-ac,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- sound/DPSample.cc.orig Fri Dec 3 21:37:53 1999
++++ sound/DPSample.cc Tue Nov 30 21:12:28 1999
+@@ -532,7 +532,7 @@
+ int rawSignedData,
+ int rawEndian)
+ {
+- int irixFile;
++ fhandle irixFile;
+ AFfilesetup fileSetup;
+ AFfilehandle file;
+ long bits;
+@@ -559,8 +559,13 @@
+ clear ();
+
+ // Open requested irix file
++#ifndef USE_STDIO
+ irixFile = open (newFilename,O_RDONLY);
+ if (irixFile == -1) return "Cannot open specified file";
++#else
++ irixFile = fopen (newFilename,"rb");
++ if (irixFile == NULL) return "Cannot open specified file";
++#endif
+
+ // Check irix file format
+ if (sampleFormat == AF_FORMAT_AIFF)
+@@ -572,16 +577,28 @@
+ case AF_FILE_AIFFC :
+ break;
+ case AF_FILE_UNSUPPORTED :
++#ifndef USE_STDIO
+ close (irixFile);
++#else
++ fclose (irixFile);
++#endif
+ return "Unsupported file format";
+ case AF_FILE_UNKNOWN :
+ default:
++#ifndef USE_STDIO
+ close (irixFile);
++#else
++ fclose (irixFile);
++#endif
+ return "Unknown file format";
+ }
+ }
+
++#ifndef USE_STDIO
+ close (irixFile);
++#else
++ fclose (irixFile);
++#endif
+
+ // Disable void handling
+ AFseterrorhandler (DPSampleAudiofileError);
diff --git a/audio/dap/patches/patch-ad b/audio/dap/patches/patch-ad
new file mode 100644
index 00000000000..72d0b0fac1e
--- /dev/null
+++ b/audio/dap/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- libaudio/Makefile.netbsd.orig Fri Dec 3 21:50:24 1999
++++ libaudio/Makefile.netbsd Fri Dec 3 21:50:43 1999
+@@ -4,7 +4,7 @@
+ HOMEDIR = $(HOME)
+ INCDIR = -I.
+ CCFLAGS = $(INCDIR) $(DEBUG) $(OPTIM) -DLINUX -DBIGENDIAN -DUSINGGCC -Wall
+-DEBUG = -g3
++DEBUG = #-g3
+ OPTIM = -O1
+
+ LIBNAME = libaudio.a
diff --git a/audio/dap/patches/patch-ae b/audio/dap/patches/patch-ae
new file mode 100644
index 00000000000..3b4fc9c8cb7
--- /dev/null
+++ b/audio/dap/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- libaudio/audio.c.orig Fri Dec 3 21:51:30 1999
++++ libaudio/audio.c Fri Dec 3 21:49:49 1999
+@@ -1708,7 +1708,7 @@
+ globalState [AL_OUTPUT_RATE].min = speed;
+ }
+
+- speed = 100000;
++ speed = 48000; /* XXXSCW: This is a pitiful hack. */
+ if (ioctl (testFile,SNDCTL_DSP_SPEED,&speed) == -1)
+ {
+ globalState [AL_INPUT_RATE].max = 48000;
diff --git a/audio/dap/patches/patch-af b/audio/dap/patches/patch-af
new file mode 100644
index 00000000000..873a4037395
--- /dev/null
+++ b/audio/dap/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- libaudiofile/Makefile.netbsd.orig Thu Nov 11 01:13:56 1999
++++ libaudiofile/Makefile.netbsd Fri Dec 3 21:55:30 1999
+@@ -4,7 +4,7 @@
+ HOMEDIR = $(HOME)
+ INCDIR = -I.
+ CCFLAGS = $(INCDIR) $(DEBUG) $(OPTIM) -DLINUX -DBIGENDIAN -DUSINGGCC -Wall
+-DEBUG = -g3
++DEBUG = #-g3
+ OPTIM = -O1
+
+ LIBNAME = libaudiofile.a
diff --git a/audio/dap/patches/patch-ag b/audio/dap/patches/patch-ag
new file mode 100644
index 00000000000..fc85c0ecc31
--- /dev/null
+++ b/audio/dap/patches/patch-ag
@@ -0,0 +1,435 @@
+$NetBSD: patch-ag,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/audiofile.c.orig Fri Nov 12 17:19:12 1999
++++ libaudiofile/audiofile.c Tue Nov 30 21:55:15 1999
+@@ -528,25 +528,39 @@
+ const char *mode,
+ AFfilesetup setup)
+ {
+- int file;
++ fhandle file;
+ AFfilehandle tempHandle;
+
+ if (!mode) return AF_NULL_FILEHANDLE;
+
+ if (!strcmp (mode,"r"))
+ {
++#ifndef USE_STDIO
+ file = open (name,O_RDONLY);
+ if (file == -1) return AF_NULL_FILEHANDLE;
+ if ((tempHandle = AFopenfd (file,mode,setup)) == AF_NULL_FILEHANDLE)
+ close (file);
++#else
++ file = fopen (name,"rb");
++ if (file == NULL) return AF_NULL_FILEHANDLE;
++ if ((tempHandle = AFopenfd (file,mode,setup)) == AF_NULL_FILEHANDLE)
++ fclose (file);
++#endif
+ }
+ else if (!strcmp (mode,"w"))
+ {
++#ifndef USE_STDIO
+ // NB decimal 438 = octal 666
+ file = open (name,O_RDWR | O_CREAT | O_TRUNC,438);
+ if (file == -1) return AF_NULL_FILEHANDLE;
+ if ((tempHandle = AFopenfd (file,mode,setup)) == AF_NULL_FILEHANDLE)
+ close (file);
++#else
++ file = fopen (name,"wb");
++ if (file == NULL) return AF_NULL_FILEHANDLE;
++ if ((tempHandle = AFopenfd (file,mode,setup)) == AF_NULL_FILEHANDLE)
++ fclose (file);
++#endif
+ }
+ else
+ {
+@@ -558,7 +572,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFopenfd
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFopenfd (int file,const char *mode,AFfilesetup setup)
++AFfilehandle AFopenfd (fhandle file,const char *mode,AFfilesetup setup)
+ {
+ if (!mode) return AF_NULL_FILEHANDLE;
+ if (!strcmp (mode,"r"))
+@@ -628,7 +642,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFreadAIFF
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFreadAIFF (int file)
++AFfilehandle AFreadAIFF (fhandle file)
+ {
+ int i;
+ int j;
+@@ -692,7 +706,11 @@
+ else
+ fail ("AIFF header does not contain a valid form type\n")
+
++#ifndef USE_STDIO
+ while (!done && !error) // && !feof (file))
++#else
++ while (!done && !error && !feof (file))
++#endif
+ {
+ if (!idRead (file,id))
+ {
+@@ -753,14 +771,22 @@
+ uiread (blocksize)
+
+ // Skip past data for now
++#ifndef USE_STDIO
+ handle->ssndStart = lseek (file,0L,SEEK_CUR);
++#else
++ handle->ssndStart = ftell (file);
++#endif
+ if (handle->ssndStart == -1) aiffError
+ handle->ssndStart += offset;
+ if (chunksize >= 8)
+ {
+ seeksize = chunksize - 8;
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ }
+ else
+ {
+@@ -817,7 +843,11 @@
+ {
+ comment [i].text =
+ (char *) calloc (comment [i].count + 1,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,comment [i].text,comment [i].count)
++#else
++ if (fread (comment [i].text,1,comment [i].count,file)
++#endif
+ != comment [i].count)
+ {
+ if (comment)
+@@ -902,7 +932,11 @@
+ if (chunksize != 24) aiffError
+
+ handle->aiff.aesdatapresent = TRUE;
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.aesdata,24) != 24) aiffError
++#else
++ if (fread (handle->aiff.aesdata,1,24,file) != 24) aiffError
++#endif
+ aesd = TRUE;
+ }
+ else if (!strncmp (id,"NAME",4))
+@@ -919,7 +953,11 @@
+ handle->aiff.misc [0].current = 0;
+ handle->aiff.misc [0].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [0].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [0].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -945,7 +983,11 @@
+ handle->aiff.misc [1].current = 0;
+ handle->aiff.misc [1].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [1].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [1].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -971,7 +1013,11 @@
+ handle->aiff.misc [2].current = 0;
+ handle->aiff.misc [2].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [2].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [2].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -1007,7 +1053,11 @@
+ handle->aiff.misc [3].current = 0;
+ handle->aiff.misc [3].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [3].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [3].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -1043,7 +1093,11 @@
+ handle->aiff.misc [4].current = 0;
+ handle->aiff.misc [4].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [4].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [4].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -1079,7 +1133,11 @@
+ handle->aiff.misc [5].current = 0;
+ handle->aiff.misc [5].data =
+ (char *) calloc (chunksize,sizeof (char));
++#ifndef USE_STDIO
+ if (read (file,handle->aiff.misc [5].data,chunksize)
++#else
++ if (fread (handle->aiff.misc [5].data,1,chunksize,file)
++#endif
+ != chunksize)
+ aiffError
+ if (chunksize % 2) ucread (uctemp)
+@@ -1100,7 +1158,11 @@
+ // Skip past data
+ seeksize = chunksize;
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ }
+ }
+
+@@ -1121,7 +1183,11 @@
+ }
+
+ // Read to start of sound data
++#ifndef USE_STDIO
+ if (lseek (file,handle->ssndStart,SEEK_SET) == -1)
++#else
++ if (fseek (file,handle->ssndStart,SEEK_SET) == -1)
++#endif
+ fail ("error seeking to start of sound data\n")
+
+ handle = (AFfilehandle) calloc (1,sizeof (aiffHandle));
+@@ -1132,7 +1198,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFwriteAIFF
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFwriteAIFF (int file,AFfilesetup setup)
++AFfilehandle AFwriteAIFF (fhandle file,AFfilesetup setup)
+ {
+ int i;
+ int j;
+@@ -1309,7 +1375,11 @@
+ idwrite ("AESD")
+ chunksize = 24;
+ iwrite (chunksize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.aesdata,24) != 24)
++#else
++ if (fwrite (handle->aiff.aesdata,1,24,file) != 24)
++#endif
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += 24;
+ }
+@@ -1339,7 +1409,11 @@
+ iwrite (chunksize)
+ if (chunksize)
+ {
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.misc [i].data,chunksize)
++#else
++ if (fwrite (handle->aiff.misc [i].data,1,chunksize,file)
++#endif
+ != chunksize)
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += chunksize;
+@@ -1364,7 +1438,10 @@
+ // Offset and blocksize zero
+ uiwrite (0)
+ uiwrite (0)
+- // fflush (file); no flushing needed
++
++#ifdef USE_STDIO
++ fflush (file);
++#endif
+
+ handle = (AFfilehandle) calloc (1,sizeof (aiffHandle));
+ *handle = handleAct;
+@@ -1374,7 +1451,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFgetfd
+ ---------------------------------------------------------------------------*/
+-int AFgetfd (AFfilehandle handle)
++fhandle AFgetfd (AFfilehandle handle)
+ {
+ if (!handle) return 0;
+ return handle->file;
+@@ -1427,7 +1504,7 @@
+ double dtemp;
+ char *tempString;
+ char idtemp [4];
+- int file;
++ fhandle file;
+ int byteWidth;
+ int bytes;
+
+@@ -1439,7 +1516,11 @@
+
+ if (handle->mode == READONLY)
+ {
++#ifndef USE_STDIO
+ if (close (handle->file) == -1) return -1;
++#else
++ if (fclose (handle->file) == -1) return -1;
++#endif
+ free (handle);
+ return 0;
+ }
+@@ -1454,7 +1535,11 @@
+ ucwrite (0)
+
+ // Reset file descriptor
++#ifndef USE_STDIO
+ if (lseek (file,0L,SEEK_SET) == -1)
++#else
++ if (fseek (file,0L,SEEK_SET) == -1)
++#endif
+ {
+ fprintf (stderr,"unable to seek on file\n");
+ return -1;
+@@ -1605,7 +1690,11 @@
+ idupdate ("AESD")
+ chunksize = 24;
+ iupdate (chunksize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.aesdata,24) != 24)
++#else
++ if (fwrite (handle->aiff.aesdata,1,24,file) != 24)
++#endif
+ return AF_NULL_FILEHANDLE;
+ }
+
+@@ -1634,7 +1723,11 @@
+ iupdate (chunksize)
+ if (chunksize)
+ {
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.misc [i].data,chunksize)
++#else
++ if (fwrite (handle->aiff.misc [i].data,1,chunksize,file)
++#endif
+ != chunksize)
+ return AF_NULL_FILEHANDLE;
+
+@@ -1664,7 +1757,11 @@
+ uiupdate (0)
+ uiupdate (0)
+
++#ifndef USE_STDIO
+ if (close (handle->file) == -1) return -1;
++#else
++ if (fclose (handle->file) == -1) return -1;
++#endif
+ free (handle);
+ return 0;
+ }
+@@ -1693,7 +1790,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFidentifyfd
+ ---------------------------------------------------------------------------*/
+-int AFidentifyfd (int file)
++int AFidentifyfd (fhandle file)
+ {
+ char id [4];
+ int bytes;
+@@ -1702,13 +1799,21 @@
+ if (!file) return AF_FILE_UNKNOWN;
+
+ // Check FORM chunk
++#ifndef USE_STDIO
+ if (read (file,id,4) != 4 || strncmp (id,"FORM",4))
++#else
++ if (fread (id,1,4,file) != 4 || strncmp (id,"FORM",4))
++#endif
+ return AF_FILE_UNKNOWN;
+
+ if (!iRead (file,&bytes))
+ return AF_FILE_UNKNOWN;
+
++#ifndef USE_STDIO
+ if (read (file,id,4) != 4)
++#else
++ if (fread (id,1,4,file) != 4)
++#endif
+ return AF_FILE_UNKNOWN;
+
+ if (!strncmp (id,"AIFF",4))
+@@ -2379,7 +2484,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ signed char ctemp;
+ short stemp;
+ int itemp;
+@@ -2393,7 +2498,11 @@
+ i = 0;
+ frameCount = 0;
+ while (handle->actualFrames < handle->aiff.framecount &&
++#ifndef USE_STDIO
+ frameCount < count) // && !(feof (file)))
++#else
++ frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
+@@ -2468,7 +2577,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ signed char ctemp;
+ short stemp;
+ int itemp;
+@@ -2481,7 +2590,11 @@
+
+ i = 0;
+ frameCount = 0;
++#ifndef USE_STDIO
+ while (frameCount < count) // && !(feof (file)))
++#else
++ while (frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
+@@ -2520,7 +2633,7 @@
+ int AFseekframe (AFfilehandle handle,int trackid,int offset)
+ {
+ int seeksize;
+- int file;
++ fhandle file;
+
+ if (!handle || trackid != AF_DEFAULT_TRACK) return 0;
+ if (handle->mode != READONLY) return 0;
+@@ -2554,7 +2667,11 @@
+
+ seeksize *= handle->aiff.channels;
+ handle->actualFrames = offset;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1)
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1)
++#endif
+ return -1;
+ else
+ return offset;
diff --git a/audio/dap/patches/patch-ah b/audio/dap/patches/patch-ah
new file mode 100644
index 00000000000..20bcc8efd76
--- /dev/null
+++ b/audio/dap/patches/patch-ah
@@ -0,0 +1,58 @@
+$NetBSD: patch-ah,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/audiofile.h.orig Mon Nov 15 13:33:40 1999
++++ libaudiofile/audiofile.h Tue Nov 30 21:05:09 1999
+@@ -28,6 +28,9 @@
+ #include <math.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++
++#define USE_STDIO
++
+ #include "ieee.h"
+
+ #ifdef __cplusplus
+@@ -35,6 +38,12 @@
+ {
+ #endif
+
++#ifndef USE_STDIO
++#define fhandle int
++#else
++#define fhandle FILE *
++#endif
++
+ #define MAX32 4294967296LL
+ #define MAX32_1 4294967295U
+ #define MAX31 2147483648U
+@@ -134,7 +143,7 @@
+ typedef struct
+ {
+ int mode;
+- int file;
++ fhandle file;
+ int actualBytes;
+ int actualFrames;
+ int ssndStart;
+@@ -286,15 +295,16 @@
+ const char *name,
+ const char *mode,
+ AFfilesetup setup);
+-AFfilehandle AFopenfd (int file,const char *mode,AFfilesetup setup);
+-AFfilehandle AFreadAIFF (int file);
+-AFfilehandle AFwriteAIFF (int file,AFfilesetup setup);
+
+-int AFgetfd (AFfilehandle handle);
++AFfilehandle AFopenfd (fhandle file,const char *mode,AFfilesetup setup);
++AFfilehandle AFreadAIFF (fhandle file);
++AFfilehandle AFwriteAIFF (fhandle file,AFfilesetup setup);
++
++fhandle AFgetfd (AFfilehandle handle);
+ int AFclosefile (AFfilehandle handle);
+ int AFclosefileAIFF (AFfilehandle handle);
+ int AFgetfilefmt (AFfilehandle handle,long *version);
+-int AFidentifyfd (int fd);
++int AFidentifyfd (fhandle fd);
+ double AFgetrate (AFfilehandle handle,int trackid);
+ void AFgetsampfmt (
+ AFfilehandle handle,
diff --git a/audio/dap/patches/patch-ai b/audio/dap/patches/patch-ai
new file mode 100644
index 00000000000..9c28505f571
--- /dev/null
+++ b/audio/dap/patches/patch-ai
@@ -0,0 +1,47 @@
+$NetBSD: patch-ai,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/macros.h.orig Wed Nov 25 21:08:27 1998
++++ libaudiofile/macros.h Tue Nov 30 21:06:17 1999
+@@ -56,6 +56,7 @@
+ void setBigEndian (int newBigEndian);
+ int getBigEndian (void);
+
++#ifndef USE_STDIO
+ int uiRead (int file,unsigned int *ui);
+ int iRead (int file,int *i);
+ int usRead (int file,unsigned short *us);
+@@ -80,6 +81,34 @@
+ int edWrite (int file,double d);
+ int idWrite (int file,char *c);
+ int pstringWrite (int file,char *c);
++
++#else
++
++#define uiRead uiReadF
++#define iRead iReadF
++#define usRead usReadF
++#define sRead sReadF
++#define ucRead ucReadF
++#define cRead cReadF
++#define fRead fReadF
++#define dRead dReadF
++#define efRead efReadF
++#define edRead edReadF
++#define idRead idReadF
++#define pstringRead pstringReadF
++#define uiWrite uiWriteF
++#define iWrite iWriteF
++#define usWrite usWriteF
++#define sWrite sWriteF
++#define ucWrite ucWriteF
++#define cWrite cWriteF
++#define fWrite fWriteF
++#define dWrite dWriteF
++#define efWrite efWriteF
++#define edWrite edWriteF
++#define idWrite idWriteF
++#define pstringWrite pstringWriteF
++#endif
+
+ int uiReadF (FILE *file,unsigned int *ui);
+ int iReadF (FILE *file,int *i);
diff --git a/audio/dap/patches/patch-aj b/audio/dap/patches/patch-aj
new file mode 100644
index 00000000000..0d233b9d05b
--- /dev/null
+++ b/audio/dap/patches/patch-aj
@@ -0,0 +1,204 @@
+$NetBSD: patch-aj,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/macros.c.orig Wed Nov 25 21:11:54 1998
++++ libaudiofile/macros.c Tue Nov 30 22:20:48 1999
+@@ -55,6 +55,7 @@
+ return bigEndian;
+ }
+
++#ifndef USE_STDIO
+ /*---------------------------------------------------------------------------
+ | FUNCTION uiRead
+ ---------------------------------------------------------------------------*/
+@@ -381,8 +382,7 @@
+ return count;
+ }
+
+-
+-
++#endif
+
+
+
+@@ -406,7 +406,7 @@
+ *ui = swapbytes_uint (*ui);
+ #endif
+
+- return 1;
++ return sizeof(*ui);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -424,7 +424,7 @@
+ *i = swapbytes_int (*i);
+ #endif
+
+- return 1;
++ return sizeof(*i);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -442,7 +442,7 @@
+ *us = swapbytes_ushort (*us);
+ #endif
+
+- return 1;
++ return sizeof(*us);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -460,7 +460,7 @@
+ *s = swapbytes_short (*s);
+ #endif
+
+- return 1;
++ return sizeof(*s);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -487,7 +487,7 @@
+ int fReadF (FILE *file,float *f)
+ {
+ if (fread (f,sizeof(*f),1,file) != 1) return 0;
+- return 1;
++ return sizeof(*f);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -496,7 +496,7 @@
+ int dReadF (FILE *file,double *d)
+ {
+ if (fread (d,sizeof(*d),1,file) != 1) return 0;
+- return 1;
++ return sizeof(*d);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -507,7 +507,7 @@
+ unsigned char etemp [10];
+ if (fread (etemp,10,1,file) != 1) return 0;
+ *f = (float) convertFromIeeeExtended (etemp);
+- return 1;
++ return sizeof(*f);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -518,7 +518,7 @@
+ unsigned char etemp [10];
+ if (fread (etemp,10,1,file) != 1) return 0;
+ *d = convertFromIeeeExtended (etemp);
+- return 1;
++ return sizeof(*d);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -527,7 +527,7 @@
+ int idReadF (FILE *file,char *c)
+ {
+ if (fread (c,4,1,file) != 1) return 0;
+- return 1;
++ return 4;
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -551,7 +551,7 @@
+ if (!ucReadF (file,&temp)) return 0;
+ count++;
+ }
+- return 1;
++ return count;
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -569,7 +569,7 @@
+
+ if (fwrite (&ui,sizeof(ui),1,file) != 1) return 0;
+
+- return 1;
++ return sizeof(ui);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -587,7 +587,7 @@
+
+ if (fwrite (&i,sizeof(i),1,file) != 1) return 0;
+
+- return 1;
++ return sizeof(i);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -605,7 +605,7 @@
+
+ if (fwrite (&us,sizeof(us),1,file) != 1) return 0;
+
+- return 1;
++ return sizeof(us);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -623,7 +623,7 @@
+
+ if (fwrite (&s,sizeof(s),1,file) != 1) return 0;
+
+- return 1;
++ return sizeof(s);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -650,7 +650,7 @@
+ int fWriteF (FILE *file,float f)
+ {
+ if (fwrite (&f,sizeof(f),1,file) != 1) return 0;
+- return 1;
++ return sizeof(f);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -659,7 +659,7 @@
+ int dWriteF (FILE *file,double d)
+ {
+ if (fwrite (&d,sizeof(d),1,file) != 1) return 0;
+- return 1;
++ return sizeof(d);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -670,7 +670,7 @@
+ unsigned char etemp [10];
+ convertToIeeeExtended ((double) f,etemp);
+ if (fwrite (etemp,10,1,file) != 1) return 0;
+- return 1;
++ return sizeof(f);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -681,7 +681,7 @@
+ unsigned char etemp [10];
+ convertToIeeeExtended (d,etemp);
+ if (fwrite (etemp,10,1,file) != 1) return 0;
+- return 1;
++ return sizeof(d);
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -690,7 +690,7 @@
+ int idWriteF (FILE *file,char *c)
+ {
+ if (fwrite (c,4,1,file) != 1) return 0;
+- return 1;
++ return 4;
+ }
+
+ /*---------------------------------------------------------------------------
+@@ -714,8 +714,9 @@
+ if (!(ucWriteF (file,temp))) return 0;
+ count++;
+ }
+- return 1;
++ return count;
+ }
++
+
+ /*---------------------------------------------------------------------------
+ | FUNCTION swapbytes_type functions
diff --git a/audio/dap/patches/patch-ak b/audio/dap/patches/patch-ak
new file mode 100644
index 00000000000..6cebf98a7d9
--- /dev/null
+++ b/audio/dap/patches/patch-ak
@@ -0,0 +1,88 @@
+$NetBSD: patch-ak,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/raw.c.orig Fri Nov 12 17:46:53 1999
++++ libaudiofile/raw.c Tue Nov 30 15:54:00 1999
+@@ -29,7 +29,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFreadRAW
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFreadRAW (int file, rawType details)
++AFfilehandle AFreadRAW (fhandle file, rawType details)
+ {
+ struct stat s;
+ aiffHandle handleAct;
+@@ -61,7 +61,11 @@
+ handle->aiff.width = 16;
+
+ // Can calculate frames from size of file
++#ifndef USE_STDIO
+ if (fstat (file,&s) == -1) return AF_NULL_FILEHANDLE;
++#else
++ if (fstat (fileno(file),&s) == -1) return AF_NULL_FILEHANDLE;
++#endif
+
+ handle->aiff.framecount = s.st_size / details.channels;
+ switch (details.dataFormat)
+@@ -83,7 +87,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFwriteRAW
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFwriteRAW (int file,AFfilesetup setup)
++AFfilehandle AFwriteRAW (fhandle file,AFfilesetup setup)
+ {
+ aiffHandle handleAct;
+ AFfilehandle handle = &handleAct;
+@@ -114,7 +118,11 @@
+ // If error then return negative number
+
+ if (!handle) return -1;
++#ifndef USE_STDIO
+ if (close (handle->file) == -1) return -1;
++#else
++ if (fclose (handle->file) == -1) return -1;
++#endif
+ free (handle);
+ return 0;
+ }
+@@ -127,7 +135,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ unsigned char uctemp;
+ signed char ctemp;
+ unsigned short ustemp;
+@@ -147,7 +155,11 @@
+ i = 0;
+ frameCount = 0;
+ while (handle->actualFrames < handle->aiff.framecount &&
++#ifndef USE_STDIO
+ frameCount < count) // && !(feof (file)))
++#else
++ frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
+@@ -252,7 +264,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ unsigned char uctemp;
+ signed char ctemp;
+ unsigned short ustemp;
+@@ -271,7 +283,11 @@
+
+ i = 0;
+ frameCount = 0;
++#ifndef USE_STDIO
+ while (frameCount < count) // && !(feof (file)))
++#else
++ while (frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
diff --git a/audio/dap/patches/patch-al b/audio/dap/patches/patch-al
new file mode 100644
index 00000000000..f7b043768b1
--- /dev/null
+++ b/audio/dap/patches/patch-al
@@ -0,0 +1,15 @@
+$NetBSD: patch-al,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $
+
+--- libaudiofile/raw.h.orig Wed Nov 25 20:38:15 1998
++++ libaudiofile/raw.h Tue Nov 30 16:00:38 1999
+@@ -25,8 +25,8 @@
+ {
+ #endif
+
+-AFfilehandle AFreadRAW (int file, rawType details);
+-AFfilehandle AFwriteRAW (int file,AFfilesetup setup);
++AFfilehandle AFreadRAW (fhandle file, rawType details);
++AFfilehandle AFwriteRAW (fhandle file,AFfilesetup setup);
+ int AFclosefileRAW (AFfilehandle handle);
+ int AFreadframesRAW (AFfilehandle handle,void *frames,int count);
+ int AFwriteframesRAW (AFfilehandle handle,void *frames,int count);
diff --git a/audio/dap/patches/patch-am b/audio/dap/patches/patch-am
new file mode 100644
index 00000000000..8a62f5075a4
--- /dev/null
+++ b/audio/dap/patches/patch-am
@@ -0,0 +1,284 @@
+$NetBSD: patch-am,v 1.1.1.1 1999/12/04 12:56:30 scw Exp $
+
+--- libaudiofile/wav.c.orig Fri Nov 12 17:55:50 1999
++++ libaudiofile/wav.c Tue Nov 30 21:55:29 1999
+@@ -32,7 +32,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFreadWAV
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFreadWAV (int file)
++AFfilehandle AFreadWAV (fhandle file)
+ {
+ int i;
+ int j;
+@@ -89,7 +89,11 @@
+ if (strncmp (id,"WAVE",4))
+ fail ("WAV header does not contain a valid form type\n")
+
++#ifndef USE_STDIO
+ while (!done && !error) // && !feof (file))
++#else
++ while (!done && !error && !feof (file))
++#endif
+ {
+ if (!idRead (file,id))
+ {
+@@ -144,11 +148,19 @@
+ }
+
+ // Skip past data for now
++#ifndef USE_STDIO
+ handle->ssndStart = lseek (file,0L,SEEK_CUR);
++#else
++ handle->ssndStart = ftell (file);
++#endif
+ if (handle->ssndStart == -1) aiffError
+ seeksize = chunksize;
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ data = TRUE;
+ }
+ else if (!strncmp (id,"cue ",4))
+@@ -210,7 +222,11 @@
+ {
+ seeksize = chunksize - 4; // Already read in list type
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ }
+ else
+ {
+@@ -226,7 +242,11 @@
+ else if (!strncmp (listType,"INFO",4)) info = TRUE;
+
+ while (!done && !error &&
++#ifndef USE_STDIO
+ amountRead < listChunksize) // && !feof (file))
++#else
++ amountRead < listChunksize && !feof (file))
++#endif
+ {
+ if (!idRead (file,id))
+ {
+@@ -253,7 +273,11 @@
+ stringsize = chunksize - 4; // Allow for mark id
+ markname = (char *) calloc (stringsize,sizeof (char));
+ if (!markname) aiffError
++#ifndef USE_STDIO
+ if (read (file,markname,stringsize) != stringsize)
++#else
++ if (fread (markname,1,stringsize,file) != stringsize)
++#endif
+ aiffError
+ markname [stringsize - 1] = 0; // Just in case
+ if (stringsize % 2) ucread (uctemp)
+@@ -292,7 +316,11 @@
+ if (chunksize % 2) amountRead++; // Space for padding byte
+ string = (char *) calloc (chunksize,sizeof (char));
+ if (!string) aiffError
++#ifndef USE_STDIO
+ if (read (file,string,chunksize) != chunksize)
++#else
++ if (fread (string,1,chunksize,file) != chunksize)
++#endif
+ aiffError
+ string [chunksize - 1] = 0; // Just in case
+ if (chunksize % 2) ucread (uctemp)
+@@ -363,7 +391,11 @@
+ // Skip past data
+ seeksize = chunksize;
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ }
+ }
+ }
+@@ -407,7 +439,11 @@
+ // Skip past data
+ seeksize = chunksize;
+ if (seeksize % 2) seeksize++;
++#ifndef USE_STDIO
+ if (lseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#else
++ if (fseek (file,seeksize,SEEK_CUR) == -1) aiffError
++#endif
+ }
+ }
+
+@@ -421,7 +457,11 @@
+ fail ("no data chunk\n")
+
+ // Read to start of sound data
++#ifndef USE_STDIO
+ if (lseek (file,handle->ssndStart,SEEK_SET) == -1)
++#else
++ if (fseek (file,handle->ssndStart,SEEK_SET) == -1)
++#endif
+ fail ("error seeking to start of sound data\n")
+
+ handle = (AFfilehandle) calloc (1,sizeof (aiffHandle));
+@@ -432,7 +472,7 @@
+ /*---------------------------------------------------------------------------
+ | FUNCTION AFwriteWAV
+ ---------------------------------------------------------------------------*/
+-AFfilehandle AFwriteWAV (int file,AFfilesetup setup)
++AFfilehandle AFwriteWAV (fhandle file,AFfilesetup setup)
+ {
+ int i;
+ int j;
+@@ -543,7 +583,11 @@
+ uiwrite (handle->aiff.mark [i].id)
+
+ if (stringsize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.mark [i].name,stringsize) != stringsize)
++#else
++ if (fwrite (handle->aiff.mark [i].name,1,stringsize,file) != stringsize)
++#endif
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += stringsize;
+
+@@ -660,7 +704,11 @@
+ {
+ chunksize = handle->aiff.misc [i].size + 1;
+ uiwrite (chunksize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.misc [i].data,handle->aiff.misc [i].size)
++#else
++ if (fwrite(handle->aiff.misc [i].data,1,handle->aiff.misc [i].size,file)
++#endif
+ != handle->aiff.misc [i].size)
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += handle->aiff.misc [i].size;
+@@ -685,7 +733,9 @@
+ // Don't know length yet
+ uiwrite (0)
+
+- // fflush (file); no flushing needed
++#ifdef USE_STDIO
++ fflush (file);
++#endif
+
+ handle = (AFfilehandle) calloc (1,sizeof (aiffHandle));
+ *handle = handleAct;
+@@ -707,7 +757,7 @@
+ unsigned short ustemp;
+ unsigned char uctemp;
+ char idtemp [4];
+- int file;
++ fhandle file;
+ int bitWidth;
+ int byteWidth;
+ unsigned int byteRate;
+@@ -723,7 +773,11 @@
+
+ if (handle->mode == READONLY)
+ {
++#ifndef USE_STDIO
+ if (close (handle->file) == -1) return -1;
++#else
++ if (fclose (handle->file) == -1) return -1;
++#endif
+ free (handle);
+ return 0;
+ }
+@@ -738,7 +792,11 @@
+ ucwrite (0)
+
+ // Reset file descriptor
++#ifndef USE_STDIO
+ if (lseek (file,0L,SEEK_SET) == -1)
++#else
++ if (fseek (file,0L,SEEK_SET) == -1)
++#endif
+ {
+ fprintf (stderr,"unable to seek on file\n");
+ return -1;
+@@ -821,7 +879,11 @@
+ uiupdate (handle->aiff.mark [i].id)
+
+ if (stringsize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.mark [i].name,stringsize) != stringsize)
++#else
++ if (fwrite(handle->aiff.mark [i].name,1,stringsize,file)!= stringsize)
++#endif
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += stringsize;
+
+@@ -938,7 +1000,11 @@
+ {
+ chunksize = handle->aiff.misc [i].size + 1;
+ uiupdate (chunksize)
++#ifndef USE_STDIO
+ if (write (file,handle->aiff.misc [i].data,handle->aiff.misc [i].size)
++#else
++ if (fwrite(handle->aiff.misc [i].data,1,handle->aiff.misc [i].size,file)
++#endif
+ != handle->aiff.misc [i].size)
+ return AF_NULL_FILEHANDLE;
+ handle->actualBytes += handle->aiff.misc [i].size;
+@@ -967,7 +1033,11 @@
+ chunksize *= byteWidth;
+ uiupdate (chunksize)
+
++#ifndef USE_STDIO
+ if (close (handle->file) == -1) return -1;
++#else
++ if (fclose (handle->file) == -1) return -1;
++#endif
+ free (handle);
+ return 0;
+ }
+@@ -982,7 +1052,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ unsigned char uctemp;
+ short stemp;
+ int itemp;
+@@ -996,7 +1066,11 @@
+ i = 0;
+ frameCount = 0;
+ while (handle->actualFrames < handle->aiff.framecount &&
++#ifndef USE_STDIO
+ frameCount < count) // && !(feof (file)))
++#else
++ frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
+@@ -1034,7 +1108,7 @@
+ int i;
+ int j;
+ int frameCount;
+- int file;
++ fhandle file;
+ unsigned char uctemp;
+ short stemp;
+ int itemp;
+@@ -1047,7 +1121,11 @@
+
+ i = 0;
+ frameCount = 0;
++#ifndef USE_STDIO
+ while (frameCount < count) // && !(feof (file)))
++#else
++ while (frameCount < count && !(feof (file)))
++#endif
+ {
+ for (j=0; j<handle->aiff.channels; j++)
+ {
diff --git a/audio/dap/patches/patch-an b/audio/dap/patches/patch-an
new file mode 100644
index 00000000000..34ea77b7829
--- /dev/null
+++ b/audio/dap/patches/patch-an
@@ -0,0 +1,15 @@
+$NetBSD: patch-an,v 1.1.1.1 1999/12/04 12:56:30 scw Exp $
+
+--- libaudiofile/wav.h.orig Thu Jan 14 23:20:03 1999
++++ libaudiofile/wav.h Tue Nov 30 16:00:32 1999
+@@ -31,8 +31,8 @@
+ #define IBM_FORMAT_ADPCM 0x0103
+
+ void AFbasicWAV (int set);
+-AFfilehandle AFreadWAV (int file);
+-AFfilehandle AFwriteWAV (int file,AFfilesetup setup);
++AFfilehandle AFreadWAV (fhandle file);
++AFfilehandle AFwriteWAV (fhandle file,AFfilesetup setup);
+ int AFclosefileWAV (AFfilehandle handle);
+ int AFreadframesWAV (AFfilehandle handle,void *frames,int count);
+ int AFwriteframesWAV (AFfilehandle handle,void *frames,int count);
diff --git a/audio/dap/patches/patch-ao b/audio/dap/patches/patch-ao
new file mode 100644
index 00000000000..2d6c3c79c3a
--- /dev/null
+++ b/audio/dap/patches/patch-ao
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1.1.1 1999/12/04 12:56:30 scw Exp $
+
+--- spkit/spkit/Makefile.netbsd.orig Fri Dec 3 22:05:21 1999
++++ spkit/spkit/Makefile.netbsd Fri Dec 3 22:06:18 1999
+@@ -9,7 +9,7 @@
+ X11DIR = /usr/X11R6
+ INCDIR = -I. -I.. -I../.. -I$(SOUND) -I$(FORMS) -I$(MAINDIR) -I$(TOOLTIP) -I$(X11DIR)/include -I$(X11DIR)/include/X11
+ CCFLAGS = $(INCDIR) $(DEBUG) $(OPTIM) -DLINUX -DBIGENDIAN -DUSINGGCC -Wall
+-DEBUG = -g3
++DEBUG = #-g3
+ OPTIM = -O2
+
+ .c.o:
diff --git a/audio/dap/patches/patch-ap b/audio/dap/patches/patch-ap
new file mode 100644
index 00000000000..16ce30a23c7
--- /dev/null
+++ b/audio/dap/patches/patch-ap
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- tooltips/Makefile.netbsd.orig Fri Dec 3 22:07:56 1999
++++ tooltips/Makefile.netbsd Fri Dec 3 22:07:24 1999
+@@ -39,7 +39,7 @@
+
+ # Uncomment out this line if you do not want debug information included.
+ # DEBUG = -g -Wall -ansi -pedantic
+-DEBUG =
++DEBUG = -O2
+
+ # Define the utilities to use for compilation.
+ CC = gcc
diff --git a/audio/dap/patches/patch-aq b/audio/dap/patches/patch-aq
new file mode 100644
index 00000000000..06b315efdce
--- /dev/null
+++ b/audio/dap/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1.1.1 1999/12/04 12:56:32 scw Exp $
+
+--- libaudio/audio.h.orig Fri Nov 12 17:35:21 1999
++++ libaudio/audio.h Fri Dec 3 23:41:47 1999
+@@ -181,7 +181,7 @@
+ #define INPUTONLY 0
+ #define OUTPUTONLY 1
+ #define DEFAULTPORTNAME "DefaultPort"
+-#define DSPNAME "/dev/dsp"
++#define DSPNAME "/dev/audio"
+ #define MIXERNAME "/dev/mixer"
+ #define NUMBEROFSTATES AL_LINUX_CHANNEL_BASE + SOUND_MIXER_NRDEVICES
+
diff --git a/audio/dap/pkg/COMMENT b/audio/dap/pkg/COMMENT
new file mode 100644
index 00000000000..7a2f6ac76a1
--- /dev/null
+++ b/audio/dap/pkg/COMMENT
@@ -0,0 +1 @@
+Digital audio recording and processing package.
diff --git a/audio/dap/pkg/DESCR b/audio/dap/pkg/DESCR
new file mode 100644
index 00000000000..5a448494835
--- /dev/null
+++ b/audio/dap/pkg/DESCR
@@ -0,0 +1,125 @@
+Digital Audio Processor
+-----------------------
+
+For Silicon Graphics (IRIX 5.3), PC (Linux and NetBSD) and Sun (Solaris 2.5)
+
+Copyright (c) 1997 Richard Kent
+
+Preamble
+--------
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 675 Mass
+Ave, Cambridge, MA 02139, USA.
+
+Introduction
+------------
+
+Welcome to the Digital Audio Processor, otherwise known as DAP. This program
+was originally produced as my final year project for a degree in Computer
+Science at Heriot-Watt University, near Edinburgh in Scotland. Since then I
+have been changing and improving DAP, attempting to make it the best sample
+editor and processor available on the UNIX platform. It still has a long way to
+go though !!
+
+The original reason for producing this program was the apallingly basic (but I
+suppose functional) "SoundEditor" bundled with IRIX 5.3 which is far too basic
+given the advanced nature of the Silicon Graphics audio facilities.
+
+What is DAP ?
+-------------
+
+DAP is a comprehensive audio sample editing and processing suite. DAP currently
+supports AIFF and AIFF-C audio files, 8 or 16 bit resolution and 1, 2 or 4
+channels of audio data. Note however that compressed AIFF-C files are not
+currently supported, only non-compressed AIFF-C files.
+
+The package itself offers comprehensive editing, playback and recording
+facilities including full time stretch resampling, manual data editing and a
+reasonably complete DSP processing suite. Note however that time stretching
+does not currently work on Solaris (still trying to debug !!).
+
+How much does it cost ?
+-----------------------
+
+Well out of the goodness of my heart (cue violins) I've given you DAP for free
+- that's right for absolutely nothing - including the source code. Yes, this is
+uncrippled, unrestricted freeware. However to ensure continuing development on
+DAP please feel free to send me some hard earned cash as a donation :) Either
+that or just send me a postcard from wherever you happen to be at the time !!
+
+Using DAP with sox
+------------------
+
+For compatibility with sox, the popular audio conversion tool, the "Sox
+Compatible" preference must be switched on in DAP. Switching this option on
+simply tells DAP not to save copyright strings when saving AIFF files. This is
+necessary as the current version of sox is rather buggy and doesn't like
+copyright strings for AIFF files as the header contains a non-alphabetic
+character (braces).
+
+Requirements
+------------
+
+To run DAP you must have the latest release version of xforms (0.88) installed
+on your system. Basically the shared object library libforms.so.0.88 must be
+somewhere in your LD_LIBRARY_PATH. See http://bragg.phys.uwm.edu/xform for
+further details on xforms.
+
+For Linux, NetBSD and Solaris you will also require the Open Sound System (OSS)
+audio drivers to be installed properly. These drivers are normally supplied
+with Linux but NetBSD and Solaris users will have to install them manually. The
+older VoxWare drivers(upon which the OSS drivers are based) may also work but
+are untested.
+
+Note that I haven't actually managed to get any actual sound in to or out of a
+Solaris machine yet - let me know if it works for you !!
+
+See http://personal.eunet.fi/pp/voxware for further details on OSS.
+
+Compilation and Installation
+----------------------------
+
+For details on compilation and installation check out the INSTALL file
+contained in this directory.
+
+And finally
+-----------
+
+Please send me comments and feedback, whether you think the program is good or
+a load of cobblers. Bug reports, suggestions, criticisms and general banter are
+just as welcomed as are any hard cash donations to entice me to continue
+development on DAP (address given later) :)
+
+So that's it, no instruction manual or help file (yet). A fair chunk of the
+program is self explanatory, the rest can all be worked out with
+experimentation. If there are any features you don't follow then just give me
+an email and I'll attempt to explain my thinking !!
+
+Oh, and not all the effects are functional yet - you'll get a lovely "Please
+Register" prompt if the effect you are trying to execute is not available.
+Ignore this prompt - it was just to look good for the demo to my project
+supervisor - there is no registration !! The only effects not working at the
+moment are gated reverberation and equalization. I will get around to finishing
+these one day. I will....
+
+Enjoy, and hope to hear from you all real soon....
+
+TicH
+
+-------------------------------------------------------------------------------
+ Name - Richard Kent (Tich)
+ EMail - richardk@cee.hw.ac.uk
+ WWW - http://www.cee.hw.ac.uk/~richardk
+-------------------------------------------------------------------------------
+ Address - 9 Henderson Street, Bridge of Allan, Stirling, Scotland, FK9 4NA
+-------------------------------------------------------------------------------
diff --git a/audio/dap/pkg/PLIST b/audio/dap/pkg/PLIST
new file mode 100644
index 00000000000..936e7315c0b
--- /dev/null
+++ b/audio/dap/pkg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/12/04 12:56:29 scw Exp $
+bin/dap