summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/aproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/aucat/aproc.c')
-rw-r--r--usr.bin/aucat/aproc.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c
index aa358a71052..8fa5c7adfb4 100644
--- a/usr.bin/aucat/aproc.c
+++ b/usr.bin/aucat/aproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aproc.c,v 1.9 2008/08/14 09:47:51 ratchov Exp $ */
+/* $OpenBSD: aproc.c,v 1.10 2008/08/14 09:58:55 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -467,6 +467,33 @@ mix_new(void)
return p;
}
+void
+mix_pushzero(struct aproc *p)
+{
+ struct abuf *obuf = LIST_FIRST(&p->obuflist);
+
+ abuf_wcommit(obuf, obuf->mixtodo);
+ obuf->mixtodo = 0;
+ abuf_flush(obuf);
+ mix_bzero(p);
+}
+
+/*
+ * Normalize input levels
+ */
+void
+mix_setmaster(struct aproc *p)
+{
+ unsigned n;
+ struct abuf *buf;
+
+ n = 0;
+ LIST_FOREACH(buf, &p->ibuflist, ient)
+ n++;
+ LIST_FOREACH(buf, &p->ibuflist, ient)
+ buf->mixvol = ADATA_UNIT / n;
+}
+
/*
* Copy data from ibuf to obuf.
*/