diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-08-27 06:54:24 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-08-27 06:54:24 +0000 |
commit | b3baf292bef2f1b1576a62e78118468f37e473a7 (patch) | |
tree | c4ccc6287df0423128657cd21b945eb0e1e41b9f /usr.bin/aucat | |
parent | 296893f40a0b2cf432a6f4e28905aa27398dbf78 (diff) |
don't discard the initial volume change message; now it matters
because the initial volume may not be MIDI_MAXCTL
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r-- | usr.bin/aucat/sock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/aucat/sock.c b/usr.bin/aucat/sock.c index 637a3e9fd69..2c0e0705366 100644 --- a/usr.bin/aucat/sock.c +++ b/usr.bin/aucat/sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.26 2009/08/27 06:31:13 ratchov Exp $ */ +/* $OpenBSD: sock.c,v 1.27 2009/08/27 06:54:23 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -372,8 +372,6 @@ sock_setvol(void *arg, unsigned vol) struct abuf *rbuf; f->vol = vol; - if (f->pstate <= SOCK_START) - f->lastvol = f->vol; rbuf = LIST_FIRST(&f->pipe.file.rproc->obuflist); if (!rbuf) { DPRINTF("sock_setvol: no read buffer yet\n"); @@ -1004,7 +1002,7 @@ sock_buildmsg(struct sock *f) /* * if volume changed build a SETVOL message */ - if (f->vol != f->lastvol) { + if (f->pstate >= SOCK_START && f->vol != f->lastvol) { DPRINTFN(4, "sock_buildmsg: %p: SETVOL: %d\n", f, f->vol); AMSG_INIT(&f->wmsg); f->wmsg.cmd = AMSG_SETVOL; |