summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/aproc.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-08-14 09:47:52 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-08-14 09:47:52 +0000
commitbbe89da068e007184794faab6172f819027c8882 (patch)
tree45530d22d918b427bde499120292c5249ee72dc0 /usr.bin/aucat/aproc.c
parentca9a45ed44195cc5bb461d4d3f5b67e9f8d4e71b (diff)
add an "AUTOQUIT" flag to mix and sub aprocs. If the flag is
set, the mix aproc will exit once there are no more input streams, similarly the sub aproc will exit once there are no more ouput streams. If the flag is not set, the mix aproc will generate silence, and the sub aproc will drop samples. By default this flag is set, so no behaviour change. ok jakemsr
Diffstat (limited to 'usr.bin/aucat/aproc.c')
-rw-r--r--usr.bin/aucat/aproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c
index f780d456e18..aa358a71052 100644
--- a/usr.bin/aucat/aproc.c
+++ b/usr.bin/aucat/aproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aproc.c,v 1.8 2008/08/14 09:45:23 ratchov Exp $ */
+/* $OpenBSD: aproc.c,v 1.9 2008/08/14 09:47:51 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -395,7 +395,7 @@ mix_out(struct aproc *p, struct abuf *obuf)
}
if (ocount == 0)
return 0;
- if (LIST_EMPTY(&p->ibuflist)) {
+ if (LIST_EMPTY(&p->ibuflist) && (p->u.mix.flags & MIX_AUTOQUIT)) {
DPRINTF("mix_out: nothing more to do...\n");
obuf->wproc = NULL;
aproc_del(p);
@@ -600,7 +600,7 @@ sub_hup(struct aproc *p, struct abuf *obuf)
DPRINTF("sub_hup: %s: detached\n", p->name);
sub_rm(p, obuf);
- if (LIST_EMPTY(&p->obuflist)) {
+ if (LIST_EMPTY(&p->obuflist) && (p->u.sub.flags & SUB_AUTOQUIT)) {
abuf_hup(ibuf);
aproc_del(p);
} else