summaryrefslogtreecommitdiff
path: root/audio/maplay/patches/patch-ah
blob: 8dc89c3ca30f74812c2f639e454d9b878cef1ee0 (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
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
$NetBSD: patch-ah,v 1.2 2004/01/18 13:59:25 mrauch Exp $

--- maplay.cc.orig	1994-06-23 14:14:36.000000000 +0200
+++ maplay.cc
@@ -54,14 +54,14 @@
 
 // data extracted from commandline arguments:
 static char *filename;
-static bool verbose_mode = False, filter_check = False;
-static bool stdout_mode = False;
+static boolean verbose_mode = False, filter_check = False;
+static boolean stdout_mode = False;
 static enum e_channels which_channels = both;
-static bool use_speaker = False, use_headphone = False, use_line_out = False;
+static boolean use_speaker = False, use_headphone = False, use_line_out = False;
 #ifdef ULAW
-static bool force_amd = False;
+static boolean force_amd = False;
 #endif
-static bool use_own_scalefactor = False;
+static boolean use_own_scalefactor = False;
 static real scalefactor;
 
 // data extracted from header of first frame:
@@ -93,7 +93,7 @@ static void Exit (int returncode)
 main (int argc, char *argv[])
 {
   int i;
-  bool read_ready = False, write_ready = False;
+  boolean read_ready = False, write_ready = False;
 
   if (argc < 2 || !strncmp (argv[1], "-h", 2))
   {
@@ -146,6 +146,9 @@ usage:
 #ifdef Solaris
 	    "SPARC Solaris 2.x"
 #else
+#ifdef __FreeBSD__
+	    "FreeBSD"
+#else
 #ifdef LINUX
 	    "Linux"
 #else
@@ -159,6 +162,7 @@ usage:
 #endif
 #endif
 #endif
+#endif
 	    " version)\n"
 	    "@(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de)\n"
 	    "@(#) Berlin University of Technology\n"
@@ -180,10 +184,10 @@ usage:
 	  stdout_mode = True;
 	  break;
 	case 'l':
-	  which_channels = left;
+	  which_channels = maplay_left;
 	  break;
 	case 'r':
-	  which_channels = right;
+	  which_channels = maplay_right;
 	  break;
 #ifdef SPARC
 	case 'u':
@@ -250,7 +254,7 @@ usage:
   // get info from header of first frame:
   layer = header->layer ();
   if ((mode = header->mode ()) == single_channel)
-    which_channels = left;
+    which_channels = maplay_left;
   sample_frequency = header->sample_frequency ();
 
   // create filter(s):
@@ -319,6 +323,17 @@ usage:
       Exit (0);
   }
 #else
+#ifdef NETBSD
+  {
+    if (NetBSDObuffer::class_suitable (mode == single_channel || which_channels != both) ? 1 : 2)
+      if (mode == single_channel || which_channels != both)
+	buffer = new NetBSDObuffer (1, header);
+      else
+	buffer = new NetBSDObuffer (2, header);
+    else
+      Exit (0);
+  }
+#else
 //#ifdef your_machine
 //  {
 //    if (mode == single_channel || which_channels != both)
@@ -333,6 +348,7 @@ usage:
     Exit (0);
   }
 //#endif	// !your_machine
+#endif  // !NETBSD
 #endif	// !LINUX
 #endif	// !SPARC
 #endif	// !Indigo