diff options
author | N.N. <matju@users.sourceforge.net> | 2009-06-03 02:20:56 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2009-06-03 02:20:56 +0000 |
commit | 7a1c1652b337ef325ce69728e14052b3dbc716bb (patch) | |
tree | 941fae2ce25aeb35834f0001b1f6141d256ea666 /desiredata/src/s_midi_oss.c | |
parent | 272bcd43473ec02c391b55fc70f703139801f6e7 (diff) |
remove references to "s_stuff.h"
svn path=/trunk/; revision=11643
Diffstat (limited to 'desiredata/src/s_midi_oss.c')
-rw-r--r-- | desiredata/src/s_midi_oss.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 <fcntl.h> #include <errno.h> #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<oss_nmidiin; i++) { char c; int ret = read(oss_midiinfd[i], &c, 1); - if (ret < 0) { + if (ret<0) { if (errno != EAGAIN) perror("MIDI"); } else if (ret != 0) { - sys_midibytein(i, (c & 0xff)); + sys_midibytein(i, c&0xff); did = 1; } } @@ -146,9 +145,9 @@ void midi_oss_init() { int fd; char namebuf[80]; oss_nmidiindevs = i; - 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;} + 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<NSEARCH; i++) { |