From 7a1c1652b337ef325ce69728e14052b3dbc716bb Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 3 Jun 2009 02:20:56 +0000 Subject: remove references to "s_stuff.h" svn path=/trunk/; revision=11643 --- desiredata/src/s_midi_oss.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'desiredata/src/s_midi_oss.c') diff --git a/desiredata/src/s_midi_oss.c b/desiredata/src/s_midi_oss.c index 4eef3e7e..c42b58ef 100644 --- a/desiredata/src/s_midi_oss.c +++ b/desiredata/src/s_midi_oss.c @@ -15,7 +15,6 @@ #include #include #include "desire.h" -#include "s_stuff.h" static int oss_nmidiin; static int oss_midiinfd [MAXMIDIINDEV]; static int oss_nmidiout; static int oss_midioutfd[MAXMIDIOUTDEV]; @@ -119,10 +118,10 @@ void sys_poll_midi() { for (int i=0; i=0) {close(fd); continue;}} - sprintf(namebuf, "/dev/midi%2.2d", i); fd = open(namebuf, O_RDONLY | O_NDELAY); if (fd>=0) {close(fd); continue;} - sprintf(namebuf, "/dev/midi%d", i); fd = open(namebuf, O_RDONLY | O_NDELAY); if (fd>=0) {close(fd); continue;} + if (i == 0) {fd = open("/dev/midi", O_RDONLY|O_NDELAY); if (fd>=0) {close(fd); continue;}} + sprintf(namebuf, "/dev/midi%2.2d", i); fd = open(namebuf, O_RDONLY|O_NDELAY); if (fd>=0) {close(fd); continue;} + sprintf(namebuf, "/dev/midi%d", i); fd = open(namebuf, O_RDONLY|O_NDELAY); if (fd>=0) {close(fd); continue;} break; } for (int i=0; i