close midi control ports and thruboxes only if there are no inputs

anymore
This commit is contained in:
Alexandre Ratchov 2011-06-02 20:48:31 +02:00
parent 4667f82af0
commit 2d6fc0ec68
1 changed files with 5 additions and 5 deletions

View File

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