summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authormycroft <mycroft@pkgsrc.org>2001-03-31 03:03:09 +0000
committermycroft <mycroft@pkgsrc.org>2001-03-31 03:03:09 +0000
commit90352a78d5c9982233b578bb0cded7a97e20e013 (patch)
treea3e2ba19ba5bd583ed32d9b14122b528184b7952 /audio
parentd01344f7ee7f30f785c90a074e091691de862431 (diff)
downloadpkgsrc-90352a78d5c9982233b578bb0cded7a97e20e013.tar.gz
More cleanup of audio init code.
Diffstat (limited to 'audio')
-rw-r--r--audio/libmikmod/files/patch-sum4
-rw-r--r--audio/libmikmod/patches/patch-ad62
2 files changed, 42 insertions, 24 deletions
diff --git a/audio/libmikmod/files/patch-sum b/audio/libmikmod/files/patch-sum
index 8fffe67fec0..ecc787cccac 100644
--- a/audio/libmikmod/files/patch-sum
+++ b/audio/libmikmod/files/patch-sum
@@ -1,6 +1,6 @@
-$NetBSD: patch-sum,v 1.6 2001/03/31 02:50:07 mycroft Exp $
+$NetBSD: patch-sum,v 1.7 2001/03/31 03:03:09 mycroft Exp $
SHA1 (patch-aa) = bfff6a9a77238e159e039bfa7d3f590bce8c9c9c
SHA1 (patch-ab) = afda9a7d29e70e42c037163ac5b2d2742c77daab
SHA1 (patch-ac) = c95d59a291570643c0b62c728ed3753fe9edb472
-SHA1 (patch-ad) = 61c2ef96b696ec75cd2f71d101e62734dcb9be56
+SHA1 (patch-ad) = fc5ac261ccf7ccd42ce49a30956f862e37d58723
diff --git a/audio/libmikmod/patches/patch-ad b/audio/libmikmod/patches/patch-ad
index 27ce315b854..b7301959636 100644
--- a/audio/libmikmod/patches/patch-ad
+++ b/audio/libmikmod/patches/patch-ad
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.3 2001/03/31 02:50:07 mycroft Exp $
+$NetBSD: patch-ad,v 1.4 2001/03/31 03:03:09 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
++++ drivers/drv_sun.c Sat Mar 31 03:01:36 2001
@@ -61,7 +61,7 @@
#include <sys/audioio.h>
#endif
@@ -11,46 +11,64 @@ $NetBSD: patch-ad,v 1.3 2001/03/31 02:50:07 mycroft Exp $
#if !defined __NetBSD__ && !defined __OpenBSD__
#ifdef HAVE_SUN_AUDIOIO_H
-@@ -72,7 +72,7 @@
+@@ -72,26 +72,12 @@
#endif
/* Sound device to open */
-#ifdef SUNOS4
-+#if defined SUNOS4 || defined __NetBSD__
++#ifndef SOLARIS /* SunOS, 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
+
+-/* Compatibility defines, for old *BSD or SunOS systems */
+-#ifndef AUDIO_ENCODING_PCM16
+-#define AUDIO_ENCODING_PCM16 AUDIO_ENCODING_LINEAR
+-#endif
+-#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
+-#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
-
+-#endif
+-
/* Compatibility defines, for old *BSD systems */
-@@ -262,7 +262,7 @@
+ #ifndef AUDIO_SPEAKER
+ #define AUDIO_SPEAKER 0x01
+@@ -262,7 +248,7 @@
md_mode |= (DMODE_STEREO | DMODE_16BITS);
play_precision = 16;
play_stereo = 2;
- play_encoding = AUDIO_ENCODING_SLINEAR_LE;
-+ play_encoding = AUDIO_ENCODING_SLINEAR;
++ play_encoding = AUDIO_ENCODING_LINEAR;
}
#endif
}
-@@ -278,7 +278,7 @@
- #else
- play_encoding =
- (play_precision ==
+@@ -273,13 +259,7 @@
+ if ((play_precision == 8) && (play_stereo == 1) &&
+ (play_rate <= 8000)) play_encoding = AUDIO_ENCODING_ULAW;
+ else
+-#ifdef SUNOS4
+ play_encoding = AUDIO_ENCODING_LINEAR;
+-#else
+- play_encoding =
+- (play_precision ==
- 16) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_ULINEAR_LE;
-+ 16) ? AUDIO_ENCODING_SLINEAR : AUDIO_ENCODING_ULINEAR;
- #endif
+-#endif
}
+ /* get current audio settings if we want to keep the playback output
+@@ -319,7 +299,9 @@
+ }
+ if ((audioinfo.play.precision != play_precision) ||
+ (audioinfo.play.channels != play_stereo) ||
++#if 0
+ (audioinfo.play.encoding != play_encoding) ||
++#endif
+ (audioinfo.play.sample_rate != play_rate)) {
+ _mm_errno = MMERR_SUN_INIT;
+ return 1;