summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libsndio/amsg.h4
-rw-r--r--lib/libsndio/sio_aucat.c4
-rw-r--r--usr.bin/aucat/sock.c9
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/libsndio/amsg.h b/lib/libsndio/amsg.h
index 6a5664ea138..2841f2e6edf 100644
--- a/lib/libsndio/amsg.h
+++ b/lib/libsndio/amsg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: amsg.h,v 1.5 2012/11/02 10:24:58 ratchov Exp $ */
+/* $OpenBSD: amsg.h,v 1.6 2012/11/23 06:40:26 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -80,7 +80,7 @@ struct amsg {
} vol;
struct amsg_hello {
uint16_t mode; /* bitmap of MODE_XXX */
-#define AMSG_VERSION 6
+#define AMSG_VERSION 7
uint8_t version; /* protocol version */
uint8_t devnum; /* device number */
uint32_t _reserved[1]; /* for future use */
diff --git a/lib/libsndio/sio_aucat.c b/lib/libsndio/sio_aucat.c
index da2a270ac56..a8ce5190732 100644
--- a/lib/libsndio/sio_aucat.c
+++ b/lib/libsndio/sio_aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sio_aucat.c,v 1.13 2012/11/02 10:24:58 ratchov Exp $ */
+/* $OpenBSD: sio_aucat.c,v 1.14 2012/11/23 06:40:26 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -189,7 +189,7 @@ sio_aucat_start(struct sio_hdl *sh)
return 0;
hdl->wbpf = par.bps * par.pchan;
hdl->rbpf = par.bps * par.rchan;
- hdl->aucat.maxwrite = hdl->wbpf * par.bufsz;
+ hdl->aucat.maxwrite = 0;
hdl->round = par.round;
hdl->delta = 0;
DPRINTF("aucat: start, maxwrite = %d\n", hdl->aucat.maxwrite);
diff --git a/usr.bin/aucat/sock.c b/usr.bin/aucat/sock.c
index ce5f497c689..b2b9c09f9e5 100644
--- a/usr.bin/aucat/sock.c
+++ b/usr.bin/aucat/sock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sock.c,v 1.66 2012/11/02 10:24:58 ratchov Exp $ */
+/* $OpenBSD: sock.c,v 1.67 2012/11/23 06:40:26 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -398,7 +398,8 @@ sock_allocbuf(struct sock *f)
aproc_setout(f->pipe.file.rproc, rbuf);
if (!ABUF_WOK(rbuf) || (f->pipe.file.state & FILE_EOF))
f->pstate = SOCK_READY;
- f->rmax = bufsz * aparams_bpf(&f->rpar);
+ f->fillpending = bufsz;
+ f->rmax = 0;
}
if (f->mode & MODE_RECMASK) {
wbuf = abuf_new(bufsz, &f->wpar);
@@ -408,7 +409,6 @@ sock_allocbuf(struct sock *f)
}
f->delta = 0;
f->tickpending = 0;
- f->fillpending = 0;
#ifdef DEBUG
if (debug_level >= 3) {
sock_dbg(f);
@@ -551,13 +551,14 @@ sock_attach(struct sock *f, int force)
*/
f->delta = dev_getpos(f->dev) *
(int)f->round / (int)f->dev->round;
- f->fillpending = 0;
f->pstate = SOCK_RUN;
#ifdef DEBUG
if (debug_level >= 3) {
sock_dbg(f);
dbg_puts(": attaching at ");
dbg_puti(f->delta);
+ dbg_puts("fillpending = ");
+ dbg_puti(f->fillpending);
dbg_puts("\n");
}
#endif