505f32f85a
PR: 44482 Submitted by: KATO Tsuguru <tkato@prontomail.com>
68 lines
1.5 KiB
Text
68 lines
1.5 KiB
Text
--- server/dda/voxware/auvoxware.c.orig Thu Jul 25 09:42:28 2002
|
|
+++ server/dda/voxware/auvoxware.c Sat Oct 26 02:54:26 2002
|
|
@@ -133,7 +133,7 @@
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
-#ifndef SVR4
|
|
+#if !defined(SVR4) && !defined(__FreeBSD__)
|
|
#include <getopt.h>
|
|
#endif
|
|
#include <sys/types.h>
|
|
@@ -171,16 +171,11 @@
|
|
#include <sys/param.h>
|
|
#include <assert.h>
|
|
|
|
-#ifdef __FreeBSD__
|
|
-# include <machine/soundcard.h>
|
|
-# include <machine/pcaudioio.h>
|
|
+#ifdef __NetBSD__
|
|
+# include <sys/ioctl.h>
|
|
+# include <soundcard.h>
|
|
#else
|
|
-# ifdef __NetBSD__
|
|
-# include <sys/ioctl.h>
|
|
-# include <soundcard.h>
|
|
-# else
|
|
-# include <sys/soundcard.h>
|
|
-# endif
|
|
+# include <sys/soundcard.h>
|
|
#endif
|
|
|
|
#include <audio/audio.h>
|
|
@@ -659,7 +654,11 @@
|
|
if(sndStatOut.fd == -1)
|
|
{
|
|
while ((sndStatOut.fd = open(sndStatOut.device,
|
|
+#if defined(__FreeBSD__)
|
|
+ sndStatOut.howToOpen|extramode,
|
|
+#else
|
|
sndStatOut.howToOpen|O_SYNC|extramode,
|
|
+#endif
|
|
0666)) == -1 && wait)
|
|
{
|
|
osLogMsg("openDevice: waiting on output device\n");
|
|
@@ -1310,6 +1309,11 @@
|
|
/*
|
|
* Setup soundcard at maximum audio quality.
|
|
*/
|
|
+
|
|
+#if defined(__FreeBSD__)
|
|
+#define NO_16_BIT_SAMPLING
|
|
+#endif
|
|
+
|
|
static void setupSoundcard(sndStatPtr)
|
|
SndStat* sndStatPtr;
|
|
{
|
|
@@ -1472,7 +1476,11 @@
|
|
sndStatOut.device, sndStatOut.howToOpen);
|
|
|
|
if ((fd = open(sndStatOut.device,
|
|
+#if defined(__FreeBSD__)
|
|
+ sndStatOut.howToOpen|extramode, 0)) == -1)
|
|
+#else
|
|
sndStatOut.howToOpen|O_SYNC|extramode, 0)) == -1)
|
|
+#endif
|
|
{
|
|
UNIDENTMSG;
|
|
return AuFalse;
|