mirror of https://github.com/ericonr/sndio.git
use (s - d->slot) a midi channel
This commit is contained in:
parent
84d21ff8c2
commit
3e3d663d33
|
@ -295,7 +295,7 @@ dev_midi_vol(struct dev *d, struct slot *s)
|
||||||
{
|
{
|
||||||
char msg[3];
|
char msg[3];
|
||||||
|
|
||||||
msg[0] = MIDI_CTL | s->midichan;
|
msg[0] = MIDI_CTL | (s - d->slot);
|
||||||
msg[1] = MIDI_CTL_VOL;
|
msg[1] = MIDI_CTL_VOL;
|
||||||
msg[2] = s->vol;
|
msg[2] = s->vol;
|
||||||
midi_send(d->midi, msg, 3);
|
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);
|
strlcpy(s->name, name, SLOT_NAMEMAX);
|
||||||
s->serial = d->serial++;
|
s->serial = d->serial++;
|
||||||
s->unit = unit;
|
s->unit = unit;
|
||||||
s->midichan = bestidx;
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (log_level >= 3) {
|
if (log_level >= 3) {
|
||||||
log_puts(name);
|
log_puts(name);
|
||||||
|
|
|
@ -96,7 +96,6 @@ struct slot {
|
||||||
unsigned int serial; /* global unique number */
|
unsigned int serial; /* global unique number */
|
||||||
unsigned int vol; /* current (midi) volume */
|
unsigned int vol; /* current (midi) volume */
|
||||||
unsigned int tstate; /* mmc state */
|
unsigned int tstate; /* mmc state */
|
||||||
unsigned int midichan; /* for volume messages */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue