1cf4aac8fc
This is version 2.2.2nb5.
50 lines
1 KiB
Text
50 lines
1 KiB
Text
$NetBSD: patch-ae,v 1.1.1.1 2004/01/26 15:40:00 jmmv Exp $
|
|
|
|
--- kmidi/linux_a.cpp.orig Mon Jan 22 12:14:45 2001
|
|
+++ kmidi/linux_a.cpp
|
|
@@ -36,6 +36,13 @@
|
|
#include <linux/soundcard.h>
|
|
#endif
|
|
|
|
+#ifdef __NetBSD__
|
|
+#include <stdio.h>
|
|
+#include <sys/ioctl.h>
|
|
+#include <soundcard.h>
|
|
+#endif
|
|
+
|
|
+
|
|
#ifdef __FreeBSD__
|
|
#include <stdio.h>
|
|
#include <machine/soundcard.h>
|
|
@@ -76,6 +83,9 @@
|
|
#ifdef LINUX_SECOND_DEVICE
|
|
"Linux 2nd dsp device", 'D',
|
|
"/dev/dsp1",
|
|
+#elif defined(__NetBSD__)
|
|
+ "NetBSD audio device", 'd',
|
|
+ "/dev/sound",
|
|
#else
|
|
"Linux dsp device", 'd',
|
|
"/dev/dsp",
|
|
@@ -320,13 +330,21 @@
|
|
static void flush_output(void)
|
|
{
|
|
output_data(0, 0);
|
|
+#if defined(__NetBSD__)
|
|
+ ioctl(dpm.fd, SNDCTL_DSP_SYNC, NULL);
|
|
+#else
|
|
ioctl(dpm.fd, SNDCTL_DSP_SYNC);
|
|
+#endif
|
|
}
|
|
|
|
static void purge_output(void)
|
|
{
|
|
b_out(dpm.id_character, dpm.fd, 0, -1);
|
|
+#if defined(__NetBSD__)
|
|
+ ioctl(dpm.fd, SNDCTL_DSP_RESET, NULL);
|
|
+#else
|
|
ioctl(dpm.fd, SNDCTL_DSP_RESET);
|
|
+#endif
|
|
}
|
|
|
|
#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__bsdi__) */
|