$NetBSD: patch-ad,v 1.15 2014/03/14 21:17:12 asau Exp $ --- server/dda/voxware/auvoxware.c.orig 2007-11-11 12:40:47.000000000 +1300 +++ server/dda/voxware/auvoxware.c @@ -183,7 +183,9 @@ static int debug_msg_indentation = 0; # else # include # endif +/* PC Speaker functions seem to be unused here # include +*/ #else # ifdef __NetBSD__ # include @@ -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",