Browse Source

Currently midi capable programs can control midi hardware, but

cannot cooperate with other programs.  The aim of this change is
to allow any program to send midi data to other programs as they
were midi hardware. For instance, this change should solve the
longstanding problem of using a midi sequencer with software
synthesizers. More precisely:
- new midicat(1) utility (actually hardlink to aucat(1)).
it creates software midi thru boxes, allowing programs
to send midi messages to other programs as they were
midi(4) hardware.
- new midi api in libsndio (see mio_open(3)), to access
midi(4) devices and midicat(1) sockets in a uniform way.
- new device naming scheme <service>:<unit>[.<option>],
common to audio and midi.
- new sndio(7) manual describing concepts and naming
The current audio device naming still works, but people having
scripts or configuration files containing device names could read
the sndio(7) man page and slowly start updating device names.
discussed with jakemsr@ and deraadt@, help form jmc@
OPENBSD_4_7
ratchov 15 years ago
parent
commit
d4ddeb3ffb
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      src/include/sndio.h

+ 13
- 1
src/include/sndio.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: sndio.h,v 1.1 2009/04/21 19:14:33 ratchov Exp $ */
/* $OpenBSD: sndio.h,v 1.2 2009/07/25 08:44:26 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@ -23,6 +23,7 @@
* private ``handle'' structure
*/
struct sio_hdl;
struct mio_hdl;
/*
* parameters of a full-duplex stream
@ -82,6 +83,8 @@ struct sio_cap {
*/
#define SIO_PLAY 1
#define SIO_REC 2
#define MIO_OUT 4
#define MIO_IN 8
/*
* maximum size of the encording string (the longest possible
@ -145,6 +148,15 @@ int sio_eof(struct sio_hdl *);
int sio_setvol(struct sio_hdl *, unsigned);
void sio_onvol(struct sio_hdl *, void (*)(void *, unsigned), void *);
struct mio_hdl *mio_open(char *, unsigned, int);
void mio_close(struct mio_hdl *);
size_t mio_write(struct mio_hdl *, void *, size_t);
size_t mio_read(struct mio_hdl *, void *, size_t);
int mio_nfds(struct mio_hdl *);
int mio_pollfd(struct mio_hdl *, struct pollfd *, int);
int mio_revents(struct mio_hdl *, struct pollfd *);
int mio_eof(struct mio_hdl *);
#ifdef __cplusplus
}
#endif


Loading…
Cancel
Save