use (s - d->slot) a midi channel

This commit is contained in:
Alexandre Ratchov 2012-09-05 01:17:41 +02:00
parent 84d21ff8c2
commit 3e3d663d33
2 changed files with 1 additions and 3 deletions

View File

@ -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);

View File

@ -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 */
};
/*