mirror of https://github.com/ericonr/sndio.git
Merge branch 'master' into mixer
This commit is contained in:
commit
33d512b797
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue