mirror of https://github.com/ericonr/sndio.git
close midi control ports and thruboxes only if there are no inputs
anymore
This commit is contained in:
parent
4667f82af0
commit
2d6fc0ec68
10
aucat/midi.c
10
aucat/midi.c
|
@ -273,7 +273,7 @@ thru_eof(struct aproc *p, struct abuf *ibuf)
|
|||
{
|
||||
if (!(p->flags & APROC_QUIT))
|
||||
return;
|
||||
if (LIST_EMPTY(&p->ins) || LIST_EMPTY(&p->outs))
|
||||
if (LIST_EMPTY(&p->ins))
|
||||
aproc_del(p);
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ thru_hup(struct aproc *p, struct abuf *obuf)
|
|||
{
|
||||
if (!(p->flags & APROC_QUIT))
|
||||
return;
|
||||
if (LIST_EMPTY(&p->outs))
|
||||
if (LIST_EMPTY(&p->ins))
|
||||
aproc_del(p);
|
||||
}
|
||||
|
||||
|
@ -835,7 +835,7 @@ ctl_slotdel(struct aproc *p, int index)
|
|||
if (s->ops)
|
||||
return;
|
||||
}
|
||||
if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
|
||||
if (LIST_EMPTY(&p->ins))
|
||||
aproc_del(p);
|
||||
}
|
||||
|
||||
|
@ -1222,7 +1222,7 @@ ctl_eof(struct aproc *p, struct abuf *ibuf)
|
|||
if (s->ops != NULL)
|
||||
s->ops->quit(s->arg);
|
||||
}
|
||||
if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
|
||||
if (LIST_EMPTY(&p->ins))
|
||||
aproc_del(p);
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ ctl_hup(struct aproc *p, struct abuf *obuf)
|
|||
if (s->ops)
|
||||
return;
|
||||
}
|
||||
if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
|
||||
if (LIST_EMPTY(&p->ins))
|
||||
aproc_del(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue