summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/aucat/dev.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c
index 3a259c42e9c..5815d84b733 100644
--- a/usr.bin/aucat/dev.c
+++ b/usr.bin/aucat/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.58 2010/06/05 16:00:52 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.59 2010/06/05 16:14:44 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -454,7 +454,7 @@ dev_close(struct dev *d)
goto restart_mix;
}
}
- } else if (d->sub || d->submon) {
+ } else if (d->sub) {
/*
* Same as above, but since there's no mixer,
* we generate EOF on the record-end of the
@@ -463,12 +463,23 @@ dev_close(struct dev *d)
restart_sub:
LIST_FOREACH(f, &file_list, entry) {
if (f->rproc != NULL &&
- (aproc_depend(d->sub, f->rproc) ||
- aproc_depend(d->submon, f->rproc))) {
+ aproc_depend(d->sub, f->rproc)) {
file_eof(f);
goto restart_sub;
}
}
+ } else if (d->submon) {
+ /*
+ * Same as above
+ */
+ restart_submon:
+ LIST_FOREACH(f, &file_list, entry) {
+ if (f->rproc != NULL &&
+ aproc_depend(d->submon, f->rproc)) {
+ file_eof(f);
+ goto restart_submon;
+ }
+ }
}
if (d->midi) {
d->midi->flags |= APROC_QUIT;