diff --git a/aucat/aucat.c b/aucat/aucat.c index bd3f59e..68293af 100644 --- a/aucat/aucat.c +++ b/aucat/aucat.c @@ -1165,6 +1165,7 @@ playrec(char *dev, int mode, int bufsz, char *port) if (dev_mh) n += mio_nfds(dev_mh); pfds = xmalloc(n * sizeof(struct pollfd)); + for (s = slot_list; s != NULL; s = s->next) slot_init(s); if (dev_mh == NULL) diff --git a/libsndio/mio.c b/libsndio/mio.c index 42f938c..95c89cc 100644 --- a/libsndio/mio.c +++ b/libsndio/mio.c @@ -141,10 +141,6 @@ mio_read(struct mio_hdl *hdl, void *buf, size_t len) hdl->eof = 1; return 0; } - if (len == 0) { - DPRINTF("mio_read: zero length read ignored\n"); - return 0; - } while (todo > 0) { n = hdl->ops->read(hdl, data, todo); if (n == 0 && hdl->eof) @@ -175,14 +171,6 @@ mio_write(struct mio_hdl *hdl, const void *buf, size_t len) hdl->eof = 1; return 0; } - if (len == 0) { - DPRINTF("mio_write: zero length write ignored\n"); - return 0; - } - if (todo == 0) { - DPRINTF("mio_write: zero length write ignored\n"); - return 0; - } while (todo > 0) { n = hdl->ops->write(hdl, data, todo); if (n == 0) { diff --git a/libsndio/mio_open.3 b/libsndio/mio_open.3 index 164560b..85870c2 100644 --- a/libsndio/mio_open.3 +++ b/libsndio/mio_open.3 @@ -53,7 +53,7 @@ library allows user processes to access hardware and .Xr sndiod 8 MIDI thru boxes and control ports in a uniform way. -.Ss Opening and closing an MIDI stream +.Ss Opening and closing a MIDI stream First the application must call the .Fn mio_open function to obtain a handle representing the newly created stream; diff --git a/libsndio/sio.c b/libsndio/sio.c index 1f4c55c..b1e659c 100644 --- a/libsndio/sio.c +++ b/libsndio/sio.c @@ -311,10 +311,6 @@ sio_read(struct sio_hdl *hdl, void *buf, size_t len) hdl->eof = 1; return 0; } - if (todo == 0) { - DPRINTF("sio_read: zero length read ignored\n"); - return 0; - } while (todo > 0) { if (!sio_rdrop(hdl)) return 0; @@ -352,10 +348,6 @@ sio_write(struct sio_hdl *hdl, const void *buf, size_t len) hdl->eof = 1; return 0; } - if (todo == 0) { - DPRINTF("sio_write: zero length write ignored\n"); - return 0; - } while (todo > 0) { if (!sio_wsil(hdl)) return 0; diff --git a/libsndio/sio_open.3 b/libsndio/sio_open.3 index b491e13..8c00880 100644 --- a/libsndio/sio_open.3 +++ b/libsndio/sio_open.3 @@ -284,6 +284,11 @@ Applications that need to have a set of working parameter combinations in advance can use the .Fn sio_getcap function. +However, for most new applications it's generally +not recommended to use +.Fn sio_getcap . +Instead, follow the recommendations for negotiating +device parameters (see above). .Pp The .Vt sio_cap @@ -367,6 +372,11 @@ structure, then the second element of the array of the .Vt sio_cap structure is valid for this configuration. +As such, when reading the array elements in the +.Vt sio_cap +structure, the corresponding +.Vt sio_conf +bitmasks should always be used. .El .Ss Starting and stopping the device The diff --git a/midicat/midicat.1 b/midicat/midicat.1 index bb95e1b..3725ebb 100644 --- a/midicat/midicat.1 +++ b/midicat/midicat.1 @@ -19,7 +19,7 @@ .Os .Sh NAME .Nm midicat -.Nd send to or receive from MIDI ports. +.Nd send to or receive from MIDI ports .Sh SYNOPSIS .Nm midicat .Bk -words @@ -75,7 +75,7 @@ $ midicat -d -q rmidi/0 -o /dev/null Send data from .Pa rmidi/0 to -.Pa midithru/0: +.Pa midithru/0 : .Bd -literal -offset indent $ midicat -q rmidi/0 -q midithru/0 .Ed