Merge branch 'master' into mixer

This commit is contained in:
Alexandre Ratchov 2019-02-22 11:11:15 +01:00
commit 33d512b797
6 changed files with 14 additions and 23 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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