diff --git a/libsndio/aucat.c b/libsndio/aucat.c index 3164f53..35ce8f6 100644 --- a/libsndio/aucat.c +++ b/libsndio/aucat.c @@ -486,8 +486,7 @@ aucat_open(struct aucat *hdl, const char *str, unsigned int mode, DPRINTF("%s: junk at end of dev name\n", p); return 0; } - if (type) - devnum += 16; /* XXX */ + devnum += type * 16; /* XXX */ DPRINTF("aucat_open: host=%s unit=%u devnum=%u opt=%s\n", host, unit, devnum, opt); if (host[0] != '\0') { diff --git a/libsndio/mio.c b/libsndio/mio.c index 09377b7..d88b898 100644 --- a/libsndio/mio.c +++ b/libsndio/mio.c @@ -68,6 +68,8 @@ mio_open(const char *str, unsigned int mode, int nbio) return mio_aucat_open(p, mode, nbio, 0); if ((p = sndio_parsetype(str, "midithru")) != NULL) return mio_aucat_open(p, mode, nbio, 1); + if ((p = sndio_parsetype(str, "midi")) != NULL) + return mio_aucat_open(p, mode, nbio, 2); #if defined(USE_RMIDI) || defined(USE_ALSA) if ((p = sndio_parsetype(str, "rmidi")) != NULL) { #if defined(USE_SUN) diff --git a/libsndio/sndio.7 b/libsndio/sndio.7 index e20ba12..3447c1b 100644 --- a/libsndio/sndio.7 +++ b/libsndio/sndio.7 @@ -93,6 +93,9 @@ Audio device exposed by .It Pa midithru MIDI thru box created with .Xr sndiod 1 . +.It Pa midi +MIDI port exposed by +.Xr sndiod 1 . .It Pa default Any audio device or MIDI port. .El