aboutsummaryrefslogtreecommitdiffstats
path: root/audio/nas/files/patch-ab
blob: c112f5c66d8382a3fb6230c931d9322484888ba7 (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
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
--- 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;