summaryrefslogtreecommitdiff
path: root/audio/dap/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'audio/dap/patches/patch-ac')
-rw-r--r--audio/dap/patches/patch-ac56
1 files changed, 56 insertions, 0 deletions
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);