summaryrefslogtreecommitdiff
path: root/audio/xamp/files/patch-aa
blob: 71fe54545ac4ffb24b9eede773a5b1ac16cdcbf4 (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
--- QtAMP.cpp	Wed Feb 11 17:53:35 1998
+++ QtAMP.cpp	Wed Jul 29 22:21:08 1998
@@ -24,10 +24,9 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sched.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <sys/soundcard.h>
+#include <machine/soundcard.h>
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <errno.h>
@@ -84,11 +84,11 @@
 	splash->show();
 	
 	// init mixer
-#ifdef OS_Linux
+#if defined(OS_Linux) || defined(OS_BSD)
 	if ((mixer = open("/dev/mixer", O_RDWR)) < 0)
 	    die("Error opening /dev/mixer, exiting\n");
 	ioctl(mixer, SOUND_MIXER_READ_PCM, &v);
-#endif OS_Linux
+#endif
 	
 	/* where mine resource file is located */
 	char home[500];
@@ -262,7 +262,7 @@
 
 QtAMP::~QtAMP()
 {
-#ifdef OS_Linux
+#if defined(OS_Linux) || defined(OS_BSD)
 	close(mixer);
 #endif
 	real_quit();
@@ -348,7 +348,7 @@
 	sprintf(volum,"Volume: %d",vr);
 	playLabel->setText( volum );
 	//	printf("%d %d\n",tvr,tv);
-#ifdef OS_Linux
+#if defined(OS_Linux) || defined(OS_BSD)
 	int x = (tv*256 + tvl);
 	ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x);
 #endif
@@ -884,14 +884,14 @@
 {
 	if (mute == 1)
 	  {
-#ifdef OS_Linux
+#if defined(OS_Linux) || defined(OS_BSD)
 		  int x = (tv*256 + tvl);
 		  ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x);
 #endif
 	  }
 	if (mute == 0)
 	  {
-#ifdef OS_Linux
+#if defined(OS_Linux) || defined(OS_BSD)
 		  int x = (7*256 + 7);
 		  ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x);
 #endif