diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-12-16 22:11:13 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-12-16 22:11:13 +0000 |
commit | f0c07518885c268a5738174d4502529dc178af9a (patch) | |
tree | 828054fd6cec27e2a876f301c6ffd9c73efdbf90 | |
parent | 5bb7173ef215e2abaccb85075762119ec70aabaf (diff) |
when searching for an endpoint, return the correct abuf pointers.
Fixes the volume knob not working when the input chain has more
than two aprocs
-rw-r--r-- | usr.bin/aucat/dev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c index 637eaa65a7f..c62fd892952 100644 --- a/usr.bin/aucat/dev.c +++ b/usr.bin/aucat/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.20 2008/12/07 17:10:41 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.21 2008/12/16 22:11:12 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -271,6 +271,7 @@ dev_getep(struct abuf **sibuf, struct abuf **sobuf) break; ibuf = LIST_FIRST(&ibuf->rproc->obuflist); } + *sibuf = ibuf; } if (sobuf) { obuf = *sobuf; @@ -283,6 +284,7 @@ dev_getep(struct abuf **sibuf, struct abuf **sobuf) break; obuf = LIST_FIRST(&obuf->wproc->ibuflist); } + *sobuf = obuf; } return 1; } @@ -445,12 +447,13 @@ dev_attach(char *name, void dev_setvol(struct abuf *ibuf, int vol) { + DPRINTF("dev_setvol: %p\n", ibuf); if (!dev_getep(&ibuf, NULL)) { DPRINTF("dev_setvol: not connected yet\n"); return; } ibuf->mixvol = vol; - DPRINTF("dev_setvol: %d\n", vol); + DPRINTF("dev_setvol: %p -> %d\n", ibuf, vol); } /* |