=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/Attic/sock.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- src/usr.bin/aucat/Attic/sock.c 2011/05/02 22:32:29 1.59 +++ src/usr.bin/aucat/Attic/sock.c 2011/06/03 16:22:34 1.60 @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.59 2011/05/02 22:32:29 ratchov Exp $ */ +/* $OpenBSD: sock.c,v 1.60 2011/06/03 16:22:34 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -530,6 +530,7 @@ sock_attach(struct sock *f, int force) { struct abuf *rbuf, *wbuf; + unsigned rch, wch; rbuf = LIST_FIRST(&f->pipe.file.rproc->outs); wbuf = LIST_FIRST(&f->pipe.file.wproc->ins); @@ -567,11 +568,13 @@ * because dev_xxx() functions are supposed to * work (i.e., not to crash) */ + if (f->opt->join) { + rch = f->opt->rpar.cmax - f->opt->rpar.cmin + 1; + wch = f->opt->wpar.cmax - f->opt->wpar.cmin + 1; + } else + rch = wch = 0; dev_attach(f->dev, f->pipe.file.name, f->mode, - rbuf, &f->rpar, - f->opt->join ? f->opt->rpar.cmax - f->opt->rpar.cmin + 1 : 0, - wbuf, &f->wpar, - f->opt->join ? f->opt->wpar.cmax - f->opt->wpar.cmin + 1 : 0, + rbuf, &f->rpar, rch, wbuf, &f->wpar, wch, f->xrun, f->opt->maxweight); if (f->mode & MODE_PLAY) dev_setvol(f->dev, rbuf, MIDI_TO_ADATA(f->vol));