summaryrefslogtreecommitdiff
path: root/devel/jlib/patches/patch-ab
blob: ef094e0e340bb6d170a4fd28014a371924486617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-ab,v 1.1.1.1 2000/10/15 17:16:05 rh Exp $

--- src/WavFile.C.orig	Sat Aug 26 03:16:28 2000
+++ src/WavFile.C
@@ -24,7 +24,11 @@
 #include "Blob.h"
 #include "TmpFile.h"
 
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
 #include <sys/soundcard.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
@@ -33,7 +37,11 @@
 #include <string.h>
 #include <unistd.h>
 
+#ifdef __NetBSD__
+const string DSP = "/dev/audio";
+#else
 const string DSP = "/dev/dsp";
+#endif
 const int WAV_FMT_PCM = 1;
 const int WAV_FMT_OKI_ADPCM = 16;
 const bool DEBUG = false;
@@ -203,7 +211,7 @@
             if(DEBUG) cout << "read " << data.length() << " bytes\n";
             if(DEBUG) cout.flush();
             
-            if(DEBUG) cout << "Writing  " << data.length() << " bytes to /dev/dsp... ";
+            if(DEBUG) cout << "Writing  " << data.length() << " bytes to " << DSP <<  " ... ";
             if(DEBUG) cout.flush();
             write(m_dsp, data.bstr(), data.length());
             if(DEBUG) cout << "done\n";