b7ae1594a5
This version adds some enhancements to aupanel, and reworks signal handling in the voxware server to avoid races, hangs and other issues seen with linux 2.6.21+ kernels. Other changes relating to the default value of the 'MixerInit' option and the new location of the local unix socket on Linux systems were also made. Also include a patch from Aleksey Cheusov for a "libpthread: Unlocking unlocked mutex" bug.
90 lines
3.4 KiB
Text
90 lines
3.4 KiB
Text
$NetBSD: patch-ad,v 1.13 2008/10/14 12:47:11 markd 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(USL) && !defined(__CYGWIN__)
|
|
+#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
|
|
inline
|
|
#endif
|
|
static void
|
|
@@ -1387,7 +1400,7 @@ monoToStereoLinearSigned16LSB(AuUint32 n
|
|
}
|
|
}
|
|
|
|
-#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__)
|
|
+#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
|
|
inline
|
|
#endif
|
|
static void
|
|
@@ -1450,7 +1463,7 @@ writePhysicalOutputsMono(void)
|
|
AuUnBlockAudio(l);
|
|
}
|
|
|
|
-#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__)
|
|
+#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__) && !defined(__powerpc__)
|
|
inline
|
|
#endif
|
|
static void
|
|
@@ -1465,7 +1478,7 @@ stereoToMonoLinearSigned16LSB(AuUint32 n
|
|
}
|
|
}
|
|
|
|
-#if defined(__GNUC__) && !defined(linux) && !defined(USL) && !defined(__CYGWIN__)
|
|
+#if defined(__GNUC__) && !defined(linux) && !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",
|