Alsa midi fixes.

This commit is contained in:
Christian Costa 2003-11-12 22:40:59 +00:00 committed by Alexandre Julliard
parent a628c13e90
commit 2aba972aff
1 changed files with 6 additions and 0 deletions

View File

@ -647,6 +647,7 @@ static DWORD modClose(WORD wDevID)
switch (MidiOutDev[wDevID].caps.wTechnology) { switch (MidiOutDev[wDevID].caps.wTechnology) {
case MOD_FMSYNTH: case MOD_FMSYNTH:
case MOD_MIDIPORT: case MOD_MIDIPORT:
case MOD_SYNTH:
snd_seq_disconnect_to(midiSeq, port_out, MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port); snd_seq_disconnect_to(midiSeq, port_out, MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port);
midiCloseSeq(); midiCloseSeq();
break; break;
@ -695,6 +696,9 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
int handled = 1; /* Assume event is handled */ int handled = 1; /* Assume event is handled */
snd_seq_event_t event; snd_seq_event_t event;
snd_seq_ev_clear(&event); snd_seq_ev_clear(&event);
snd_seq_ev_set_direct(&event);
snd_seq_ev_set_source(&event, port_out);
snd_seq_ev_set_dest(&event, MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port);
switch (evt & 0xF0) { switch (evt & 0xF0) {
case MIDI_CMD_NOTE_OFF: case MIDI_CMD_NOTE_OFF:
@ -755,6 +759,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
buf[1] = d1; buf[1] = d1;
snd_seq_ev_set_sysex(&event, sizeof(buf), buf); snd_seq_ev_set_sysex(&event, sizeof(buf), buf);
} }
break;
case 0x02: /* Song Position Pointer. */ case 0x02: /* Song Position Pointer. */
{ {
BYTE buf[3]; BYTE buf[3];
@ -763,6 +768,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
buf[2] = d2; buf[2] = d2;
snd_seq_ev_set_sysex(&event, sizeof(buf), buf); snd_seq_ev_set_sysex(&event, sizeof(buf), buf);
} }
break;
} }
break; break;
} }