summaryrefslogtreecommitdiff
path: root/audio/s3mod/files/patch-aa
blob: e49f2e5d1cf6b571d7bac5ddb7a6f23210dd4a6a (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--- config.h.orig	Sun Jun  8 00:11:14 1997
+++ config.h	Sun Jun  8 00:12:37 1997
@@ -64,6 +64,14 @@
 #define GUS
 #endif /* GUS */
 
+#elif defined(__FreeBSD__)
+#define BIT_32
+#undef NEAR_FAR_PTR
+#define DSP
+#ifndef GUS
+#define GUS
+#endif /* GUS */
+
 #elif defined(MSDOS)
 #define NEAR_FAR_PTR
 #define DSP
--- dsp.c.orig	Sat Oct 21 14:40:29 1995
+++ dsp.c	Sun Jun  8 00:21:50 1997
@@ -22,14 +22,14 @@
  *  linux_dsp.c - Support for the Linux DSP driver from the Voxware(C) Drivers.
  */
 
-#ifdef LINUX
+#ifdef __FreeBSD__
 #include "config.h"
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/types.h>
-#include <linux/soundcard.h>
-#include <bytesex.h>
+#include <machine/soundcard.h>
+#include <machine/endian.h>
 #include "main.h"
 #include "dsp.h"
 
@@ -93,5 +93,5 @@
     return;
 }
 
-#endif /* ?LINUX */
+#endif /* ?__FreeBSD__ */
 
--- gus.c.orig	Sun Jun  8 00:05:28 1997
+++ gus.c	Sun Jun  8 00:05:51 1997
@@ -25,8 +25,8 @@
 
 #ifdef GUS
 
-#include <sys/soundcard.h>
-#include <sys/ultrasound.h>
+#include <machine/soundcard.h>
+#include <machine/ultrasound.h>
 #include <unistd.h>
 #include "gus.h"
 #include "mod.h"
--- main.c.orig	Sun Jun  8 00:05:59 1997
+++ main.c	Sun Jun  8 00:10:46 1997
@@ -56,6 +56,10 @@
   printf("         Linux Support by Daniel Marks \n");
   printf("           GUS Support by David Jeske (jeske@uiuc.edu)\n");
 #endif /* LINUX */
+#ifdef __FreeBSD__
+  printf("         FreeBSD Support by Vanilla I. Shu \n");
+  printf("           GUS Support by David Jeske (jeske@uiuc.edu\n");
+#endif /* __FreeBSD__ */
 #if defined(__sgi)
   printf("           SGI Support by Mike Muuss (Mike@arl.mil)\n\n");
 #endif /* __sgi */
@@ -69,6 +73,9 @@
 #ifdef LINUX
   printf("     -b 16 bit samples\n");
 #endif /* ?LINUX */
+#ifdef __FreeBSD__
+  printf("     -b 16 bit samples\n");
+#endif /* __FreeBSD__ */
   printf("     -f set frequency\n");
   printf("     -q quiet (don't print anything)\n");
   printf("     -n don't loop\n");
@@ -76,6 +83,9 @@
 #ifdef LINUX
   printf("     -g do NOT use GUS native mode\n");
 #endif /* ?LINUX */
+#ifdef __FreeBSD__
+  printf("     -g do NOT use GUS native mode\n");
+#endif /* __FreeBSD__ */
   printf("     -p PAL speed adjustment (145bpm start)\n");
   printf("s3mod -sbf 44100 foobar.mod\n");
   printf("   plays in stereo, 16 bits, 44.1 kHz\n\n");
--- mod.c.orig	Sun Jun  8 00:12:48 1997
+++ mod.c	Sun Jun  8 00:14:30 1997
@@ -11,7 +11,7 @@
 
 
 #ifdef GUS
-#include <sys/ultrasound.h>
+#include <machine/ultrasound.h>
 #include "gus.h"
 #endif /* GUS */
 
@@ -130,8 +130,10 @@
     /* Portamento Down */
     if ((track->period += track->port_down) > track->period_high_limit)
       track->period = track->period_high_limit;
-    track->pitch = track->finetune_rate / track->period;
-
+    if (track->period != 0)
+      track->pitch = track->finetune_rate / track->period;
+    else
+      track->pitch = 1;
     track->playing_period = track->period;
   }
 
--- play.c.orig	Sun Jun  8 00:15:23 1997
+++ play.c	Sun Jun  8 00:15:46 1997
@@ -36,7 +36,7 @@
 #include "dsp.h"
 
 #ifdef GUS
-#include <sys/ultrasound.h>
+#include <machine/ultrasound.h>
 #include "gus.h"
 #endif /* GUS */
 
--- gus.h.orig	Sun Jun  8 00:31:14 1997
+++ gus.h	Sun Jun  8 00:31:23 1997
@@ -26,7 +26,7 @@
 #ifndef _GUS_H
 #define _GUS_H 
 
-#include <sys/soundcard.h>
+#include <machine/soundcard.h>
 
 #define ERR_SEQUENCER    51
 #define ERR_NOGUS        53