summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/midi.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-10-10 12:43:10 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-10-10 12:43:10 +0000
commit96782ef80dd52562aa753c36cf4d4abe6b426b64 (patch)
tree97c865e3390f009aa3ab7dfcb471585d12f3c753 /usr.bin/aucat/midi.c
parentec19e264dc74ff12317c8579e4d892a2ad0acdec (diff)
make dev_done() common to audio and MIDI, and drop dev_thrudone()
Diffstat (limited to 'usr.bin/aucat/midi.c')
-rw-r--r--usr.bin/aucat/midi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c
index 0e794305a36..2a2f9c8c813 100644
--- a/usr.bin/aucat/midi.c
+++ b/usr.bin/aucat/midi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midi.c,v 1.10 2009/10/09 16:49:48 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.11 2009/10/10 12:43:09 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -225,11 +225,19 @@ thru_out(struct aproc *p, struct abuf *obuf)
void
thru_eof(struct aproc *p, struct abuf *ibuf)
{
+ if (!(p->u.thru.flags & THRU_AUTOQUIT))
+ return;
+ if (LIST_EMPTY(&p->obuflist) || LIST_EMPTY(&p->ibuflist))
+ aproc_del(p);
}
void
thru_hup(struct aproc *p, struct abuf *obuf)
{
+ if (!(p->u.thru.flags & THRU_AUTOQUIT))
+ return;
+ if (LIST_EMPTY(&p->obuflist) || LIST_EMPTY(&p->ibuflist))
+ aproc_del(p);
}
void