mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
Merge branch 'master' into mixer
This commit is contained in:
commit
81d171003b
@ -335,10 +335,8 @@ bad_gen:
|
|||||||
unlink(tmp);
|
unlink(tmp);
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (tmp)
|
free(tmp);
|
||||||
free(tmp);
|
free(path);
|
||||||
if (path)
|
|
||||||
free(path);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,3 +247,8 @@ may be a value between 0 and 2.
|
|||||||
.Xr midi 4 ,
|
.Xr midi 4 ,
|
||||||
.Xr sndio 7 ,
|
.Xr sndio 7 ,
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
|
.Sh HISTORY
|
||||||
|
These functions first appeared in
|
||||||
|
.Ox 4.7 .
|
||||||
|
.Sh AUTHORS
|
||||||
|
.An Alexandre Ratchov Aq Mt ratchov@openbsd.org
|
||||||
|
@ -66,7 +66,7 @@ static struct mio_ops mio_rmidi_ops = {
|
|||||||
mio_rmidi_revents
|
mio_rmidi_revents
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
int
|
||||||
mio_rmidi_getfd(const char *str, unsigned int mode, int nbio)
|
mio_rmidi_getfd(const char *str, unsigned int mode, int nbio)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
@ -77,6 +77,9 @@ mio_rmidi_getfd(const char *str, unsigned int mode, int nbio)
|
|||||||
#endif
|
#endif
|
||||||
int fd, flags;
|
int fd, flags;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
_sndio_debug_init();
|
||||||
|
#endif
|
||||||
p = _sndio_parsetype(str, "rmidi");
|
p = _sndio_parsetype(str, "rmidi");
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
DPRINTF("mio_rmidi_getfd: %s: \"rsnd\" expected\n", str);
|
DPRINTF("mio_rmidi_getfd: %s: \"rsnd\" expected\n", str);
|
||||||
@ -135,11 +138,14 @@ mio_rmidi_getfd(const char *str, unsigned int mode, int nbio)
|
|||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct mio_hdl *
|
struct mio_hdl *
|
||||||
mio_rmidi_fdopen(int fd, unsigned int mode, int nbio)
|
mio_rmidi_fdopen(int fd, unsigned int mode, int nbio)
|
||||||
{
|
{
|
||||||
struct mio_rmidi_hdl *hdl;
|
struct mio_rmidi_hdl *hdl;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
_sndio_debug_init();
|
||||||
|
#endif
|
||||||
hdl = malloc(sizeof(struct mio_rmidi_hdl));
|
hdl = malloc(sizeof(struct mio_rmidi_hdl));
|
||||||
if (hdl == NULL)
|
if (hdl == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -267,7 +267,7 @@ sio_sun_getcap(struct sio_hdl *sh, struct sio_cap *cap)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
@ -275,6 +275,9 @@ sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
|||||||
unsigned int devnum;
|
unsigned int devnum;
|
||||||
int fd, flags;
|
int fd, flags;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
_sndio_debug_init();
|
||||||
|
#endif
|
||||||
p = _sndio_parsetype(str, "rsnd");
|
p = _sndio_parsetype(str, "rsnd");
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
DPRINTF("sio_sun_getfd: %s: \"rsnd\" expected\n", str);
|
DPRINTF("sio_sun_getfd: %s: \"rsnd\" expected\n", str);
|
||||||
@ -307,11 +310,14 @@ sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
|||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sio_hdl *
|
struct sio_hdl *
|
||||||
sio_sun_fdopen(int fd, unsigned int mode, int nbio)
|
sio_sun_fdopen(int fd, unsigned int mode, int nbio)
|
||||||
{
|
{
|
||||||
struct sio_sun_hdl *hdl;
|
struct sio_sun_hdl *hdl;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
_sndio_debug_init();
|
||||||
|
#endif
|
||||||
hdl = malloc(sizeof(struct sio_sun_hdl));
|
hdl = malloc(sizeof(struct sio_sun_hdl));
|
||||||
if (hdl == NULL)
|
if (hdl == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -191,6 +191,11 @@ int siomix_pollfd(struct siomix_hdl *, struct pollfd *, int);
|
|||||||
int siomix_revents(struct siomix_hdl *, struct pollfd *);
|
int siomix_revents(struct siomix_hdl *, struct pollfd *);
|
||||||
int siomix_eof(struct siomix_hdl *);
|
int siomix_eof(struct siomix_hdl *);
|
||||||
|
|
||||||
|
int mio_rmidi_getfd(const char *, unsigned int, int);
|
||||||
|
struct mio_hdl *mio_rmidi_fdopen(int, unsigned int, int);
|
||||||
|
int sio_sun_getfd(const char *, unsigned int, int);
|
||||||
|
struct sio_hdl *sio_sun_fdopen(int, unsigned int, int);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user