From 3e3d663d334803e2af62dae769b8d36e82ec1417 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 5 Sep 2012 01:17:41 +0200 Subject: [PATCH] use (s - d->slot) a midi channel --- sndiod/dev.c | 3 +-- sndiod/dev.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sndiod/dev.c b/sndiod/dev.c index c8dcc12..62ff8a4 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -295,7 +295,7 @@ dev_midi_vol(struct dev *d, struct slot *s) { char msg[3]; - msg[0] = MIDI_CTL | s->midichan; + msg[0] = MIDI_CTL | (s - d->slot); msg[1] = MIDI_CTL_VOL; msg[2] = s->vol; midi_send(d->midi, msg, 3); @@ -1501,7 +1501,6 @@ slot_new(struct dev *d, char *who, struct slotops *ops, void *arg, int mode) strlcpy(s->name, name, SLOT_NAMEMAX); s->serial = d->serial++; s->unit = unit; - s->midichan = bestidx; #ifdef DEBUG if (log_level >= 3) { log_puts(name); diff --git a/sndiod/dev.h b/sndiod/dev.h index 83d2bae..0aa4343 100644 --- a/sndiod/dev.h +++ b/sndiod/dev.h @@ -96,7 +96,6 @@ struct slot { unsigned int serial; /* global unique number */ unsigned int vol; /* current (midi) volume */ unsigned int tstate; /* mmc state */ - unsigned int midichan; /* for volume messages */ }; /*