summaryrefslogtreecommitdiff
path: root/audio/libmikmod/patches/patch-ad
blob: 27ce315b85497109accc336d9ccc5887050d5eb2 (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
$NetBSD: patch-ad,v 1.3 2001/03/31 02:50:07 mycroft Exp $

--- drivers/drv_sun.c.orig	Mon Feb 14 22:10:21 2000
+++ drivers/drv_sun.c	Sat Mar 31 02:48:11 2001
@@ -61,7 +61,7 @@
 #include <sys/audioio.h>
 #endif
 
-#define DEFAULT_FRAGSIZE 12
+#define DEFAULT_FRAGSIZE 13
 
 #if !defined __NetBSD__  && !defined __OpenBSD__
 #ifdef HAVE_SUN_AUDIOIO_H
@@ -72,7 +72,7 @@
 #endif
 
 /* Sound device to open */
-#ifdef SUNOS4
+#if defined SUNOS4 || defined __NetBSD__
 #define SOUNDDEVICE "/dev/sound"
 #else /* Solaris, *BSD */
 #define SOUNDDEVICE "/dev/audio"
@@ -85,11 +85,11 @@
 #ifndef AUDIO_ENCODING_PCM8
 #define AUDIO_ENCODING_PCM8 AUDIO_ENCODING_LINEAR8
 #endif
-#ifndef AUDIO_ENCODING_SLINEAR_LE
-#define AUDIO_ENCODING_SLINEAR_LE AUDIO_ENCODING_PCM16
+#ifndef AUDIO_ENCODING_SLINEAR
+#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_PCM16
 #endif
-#ifndef AUDIO_ENCODING_ULINEAR_LE
-#define AUDIO_ENCODING_ULINEAR_LE AUDIO_ENCODING_PCM8
+#ifndef AUDIO_ENCODING_ULINEAR
+#define AUDIO_ENCODING_ULINEAR AUDIO_ENCODING_PCM8
 #endif
 
 /* Compatibility defines, for old *BSD systems */
@@ -262,7 +262,7 @@
 			md_mode |= (DMODE_STEREO | DMODE_16BITS);
 			play_precision = 16;
 			play_stereo = 2;
-			play_encoding = AUDIO_ENCODING_SLINEAR_LE;
+			play_encoding = AUDIO_ENCODING_SLINEAR;
 		}
 #endif
 	}
@@ -278,7 +278,7 @@
 #else
 			play_encoding =
 				(play_precision ==
-				 16) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_ULINEAR_LE;
+				 16) ? AUDIO_ENCODING_SLINEAR : AUDIO_ENCODING_ULINEAR;
 #endif
 	}