672215ec86
Changes are unknown. Package changes: * the c-preprocessor should now correctly chose whether to build big-endian or little-endian specific code * added support for NetBSD native audio API
25 lines
824 B
Text
25 lines
824 B
Text
$NetBSD: patch-ae,v 1.2 2002/03/23 02:23:00 wiz Exp $
|
|
|
|
--- midisend.c.orig Sun Nov 18 09:05:57 2001
|
|
+++ midisend.c
|
|
@@ -16,8 +16,18 @@
|
|
#include <ctype.h>
|
|
#include <sys/ioctl.h>
|
|
#include <fcntl.h>
|
|
-#ifdef FREE_BSD
|
|
-# include <sys/soundcard.h>
|
|
+#ifdef BSD
|
|
+#include <sys/midiio.h>
|
|
+#define SEQ_MIDIPUTC SEQOLD_MIDIPUTC
|
|
+#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
|
|
+#define _SEQ_ADVBUF(len) _seqbufptr += len
|
|
+#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
|
|
+#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\
|
|
+ _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\
|
|
+ _seqbuf[_seqbufptr+1] = (byte);\
|
|
+ _seqbuf[_seqbufptr+2] = (device);\
|
|
+ _seqbuf[_seqbufptr+3] = 0;\
|
|
+ _SEQ_ADVBUF(4);}
|
|
#else
|
|
# include <linux/soundcard.h>
|
|
#endif
|