summaryrefslogtreecommitdiff
path: root/audio/xmix/patches/patch-ab
blob: 801288fbc7fbe8ac716b6648ab75d8fc329494cf (plain)
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
$NetBSD: patch-ab,v 1.5 2011/09/04 22:17:41 dholland Exp $

- support more OSes (is the first hunk actually correct?)
- fix void main
- remove debug printout

--- xmix.c.orig	2011-09-04 22:12:45.000000000 +0000
+++ xmix.c
@@ -77,7 +77,12 @@ to Rick! I'll call this version V2.1
 #include "square_empty.bit"
 #include "square_with_x.bit"
 
-#include <linux/soundcard.h>
+#ifdef __NetBSD__
+#include <sys/ioctl.h>
+#include <soundcard.h>
+#else
+#include <machine/soundcard.h>
+#endif
 
 #define SOUND_FULL_SCALE 100.0
 #define MAX_SOUND_VOL 95
@@ -450,7 +455,7 @@ static void set_supported(VolumeControl 
 }
 
 
-void main (int argc, char **argv)
+int main (int argc, char **argv)
 {
   XtAppContext app_context;
   int scroll_sep, longway;
@@ -742,7 +747,7 @@ void main (int argc, char **argv)
   mic.locked = 0;
   reclvl.locked = 0;
 
-  printf("supported = 0x%x\n",supported);
+  /*printf("supported = 0x%x\n",supported);*/
   set_supported(&master,(supported & SOUND_MASK_VOLUME) != 0);
   set_supported(&bass,(supported & SOUND_MASK_BASS) != 0);
   set_supported(&treble,(supported & SOUND_MASK_TREBLE) != 0);