aboutsummaryrefslogtreecommitdiff
path: root/audio/nas/files/patch-ab
blob: 4758d9d13c2796c106a2e17ceb09d1fab801d842 (plain) (blame)
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
--- server/dda/voxware/auvoxware.c.orig	Sun Mar  5 11:40:55 2000
+++ server/dda/voxware/auvoxware.c	Sat Mar 25 15:18:36 2000
@@ -610,7 +610,11 @@
 
     if(sndStatOut.fd == -1)
     {
+#ifdef __FreeBSD__
+       while ((sndStatOut.fd = open(sndStatOut.device, O_RDWR)) == -1 && wait)
+#else
        while ((sndStatOut.fd = open(sndStatOut.device, O_RDWR|O_SYNC)) == -1 && wait)
+#endif
        {
            osLogMsg("openDevice: waiting on output device\n");
            sleep(1);
@@ -1230,6 +1234,11 @@
 /*
  * Setup soundcard at maximum audio quality.
  */
+
+#ifdef __FreeBSD__
+#define NO_16_BIT_SAMPLING
+#endif
+
 static void setupSoundcard(sndStatPtr)
 SndStat* sndStatPtr;
 {
@@ -1380,7 +1389,11 @@
 
     AL_initialized = AuTrue;
 
+#ifdef __FreeBSD__
+    if ((fd = open(sndStatOut.device, O_RDWR, 0)) == -1) {
+#else
     if ((fd = open(sndStatOut.device, O_RDWR|O_SYNC, 0)) == -1) {
+#endif
         UNIDENTMSG;
         return AuFalse;
     }