summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2012-09-25 20:12:35 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2012-09-25 20:12:35 +0000
commit7b3a677c0bfa3fe7b89bec59895ba0789d131206 (patch)
tree8828687b25fc0bd653c122c947395c96d7c30333 /usr.bin/aucat
parent48fe907fe046c417cde943a1f91ed6b234778c0b (diff)
Upon "master volume change" message, send feedback to other clients
only. Fixes the master volume slider stuttering in MIDI programs. Found by armani@
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r--usr.bin/aucat/dev.c6
-rw-r--r--usr.bin/aucat/midi.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c
index 5e050b211d8..da403fabb1e 100644
--- a/usr.bin/aucat/dev.c
+++ b/usr.bin/aucat/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.81 2012/08/30 07:48:01 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.82 2012/09/25 20:12:34 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -1728,8 +1728,4 @@ dev_master(struct dev *d, unsigned int master)
d->mix->u.mix.master = MIDI_TO_ADATA(master);
mix_setmaster(d->mix);
}
- if (APROC_OK(d->midi)) {
- midi_send_master(d->midi);
- midi_flush(d->midi);
- }
}
diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c
index 7aa8dea6813..7533c78b2c8 100644
--- a/usr.bin/aucat/midi.c
+++ b/usr.bin/aucat/midi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midi.c,v 1.43 2012/04/25 07:21:41 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.44 2012/09/25 20:12:34 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -420,6 +420,7 @@ midi_onvoice(struct aproc *p, struct abuf *ibuf)
#endif
if ((ibuf->r.midi.msg[0] & MIDI_CMDMASK) == MIDI_CTL &&
(ibuf->r.midi.msg[1] == MIDI_CTLVOL)) {
+ midi_send(p, ibuf, ibuf->r.midi.msg, 3);
chan = ibuf->r.midi.msg[0] & MIDI_CHANMASK;
if (chan >= CTL_NSLOT)
return;
@@ -461,8 +462,10 @@ midi_onsysex(struct aproc *p, struct abuf *ibuf)
switch (x->type) {
case SYSEX_TYPE_RT:
if (x->id0 == SYSEX_CONTROL && x->id1 == SYSEX_MASTER) {
- if (len == SYSEX_SIZE(master))
+ if (len == SYSEX_SIZE(master)) {
dev_master(p->u.midi.dev, x->u.master.coarse);
+ midi_send(p, ibuf, (unsigned char *)x, len);
+ }
return;
}
if (x->id0 != SYSEX_MMC)