From ff6e3d97e1558a78dfa14c07472fbc7983533e94 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Tue, 31 Mar 2020 06:29:06 +0000 Subject: Don't send "control changed" messages when hardware controls are set. This sends twice the "control changed" messages because a second message will be sent upon the notification from the hardware. --- usr.bin/sndiod/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index 0fbfb911e6b..1aae5c3220f 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.65 2020/03/08 14:52:20 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.66 2020/03/31 06:29:05 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -2398,9 +2398,9 @@ dev_setctl(struct dev *d, int addr, int val) slot_setvol(d->slot + num, val); dev_midi_vol(d, d->slot + num); } + c->val_mask = ~0U; } c->curval = val; - c->val_mask = ~0U; return 1; } -- cgit v1.2.3