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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
$NetBSD: patch-ad,v 1.14 2013/01/05 12:57:22 mef Exp $
--- server/dda/voxware/auvoxware.c.orig 2007-11-11 12:40:47.000000000 +1300
+++ server/dda/voxware/auvoxware.c
@@ -245,8 +245,13 @@ SndStat sndStatIn = {
256, /* fragSize */
3, /* minFrags */
32, /* maxFrags */
+#if defined(__NetBSD__)
+ "@DEVOSSAUDIO@", /* device */
+ "/dev/mixer", /* mixer */
+#else
"/dev/dsp1", /* device */
"/dev/mixer1", /* mixer */
+#endif
O_RDONLY, /* howToOpen */
1, /* autoOpen */
0, /* forceRate */
@@ -266,7 +271,11 @@ SndStat sndStatOut = {
256, /* fragSize */
3, /* minFrags */
32, /* maxFrags */
+#if defined(__NetBSD__)
+ "@DEVOSSAUDIO@", /* device */
+#else
"/dev/dsp", /* device */
+#endif
"/dev/mixer", /* mixer */
O_WRONLY, /* howToOpen */
1, /* autoOpen */
@@ -875,7 +884,11 @@ openDevice(AuBool wait)
if (sndStatOut.fd == -1) {
while ((sndStatOut.fd = open(sndStatOut.device,
sndStatOut.
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+ howToOpen | extramode,
+#else
howToOpen | O_SYNC | extramode,
+#endif
0666)) == -1 && wait) {
osLogMsg("openDevice: waiting on output device\n");
sleep(1);
@@ -1372,7 +1385,7 @@ disableProcessFlow(void)
}
-#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__)
+#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
inline
#endif
static void
@@ -1387,7 +1400,7 @@ monoToStereoLinearSigned16LSB(AuUint32 n
}
}
-#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__)
+#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
inline
#endif
static void
@@ -1450,7 +1463,7 @@ writePhysicalOutputsMono(void)
AuUnBlockAudio(l);
}
-#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__)
+#if defined(__GNUC__) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
inline
#endif
static void
@@ -1880,7 +1893,11 @@ AuInitPhysicalDevices(void)
sndStatOut.device, sndStatOut.howToOpen);
if ((fd = open(sndStatOut.device,
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+ sndStatOut.howToOpen | extramode,
+#else
sndStatOut.howToOpen | O_SYNC | extramode,
+#endif
0)) == -1) {
UNIDENTMSG;
osLogMsg("Init: Output open(%s) failed: %s\n",
|