$NetBSD: patch-aa,v 1.2 2011/03/23 14:09:31 obache Exp $

--- include/sound.h.orig	1999-09-02 14:34:10.000000000 +0000
+++ include/sound.h
@@ -215,7 +215,7 @@ struct SoundCacheBufferTag {
  *  FreeBSD
  */
 
-#if defined(__FreeBSD__) && defined(USE_SOUND)
+#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(USE_SOUND)
 
 /* FreeBSD with SoundBlaster Pro */
 
@@ -233,10 +233,50 @@ struct SoundCacheBufferTag {
 };
 
 #define	SoundCacheBuffer	struct SoundCacheBufferTag
+#ifdef __DragonFly__
+#define	AUDIO_DEVICE		"/dev/dsp"
+#else
 #define	AUDIO_DEVICE		"/dev/audio"
+#endif
 
 #endif	/* FreeBSD */
 
+/*
+ *  NetBSD
+ */
+
+#if defined(__NetBSD__) && defined(USE_SOUND)
+
+/* NetBSD with MB6258V */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/audioio.h>
+#include <machine/bswap.h>
+
+#define	AUDIO_DEVICE		"/dev/audio"
+#define	AUDIO_CTLDEVICE		"/dev/audioctl"
+#define	AUDIOMAGICNUMBER	(0x2e736e64)		/* ".snd" */
+#ifndef AUDIO_ENCODING_LINEAR
+#define AUDIO_ENCODING_LINEAR	(3)	/* Linear PCM encoding */
+#endif
+
+#undef	O_RDWR
+#define	O_RDWR	O_WRONLY	/* audio $B%G%P%$%9$OF1;~%*!<%W%s$G$-$J$$!)(B */
+
+struct SoundCacheBufferTag {
+    char	*soundCacheBuffer;
+    int		soundLength;
+    audio_info_t	soundBParam;
+};
+
+#define	SoundCacheBuffer	struct SoundCacheBufferTag
+
+#endif	/* NetBSD */
 
 #else	/* USE_NETAUDIO */
 
