winealsa.drv: Send MIDI events to port subscribers.
This way changes to the port connections made by other applications will be honoured. Signed-off-by: Jacek Konieczny <jajcus@jajcus.net> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1875887000
commit
3d57cc2863
|
@ -871,7 +871,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
|
||||||
snd_seq_ev_clear(&event);
|
snd_seq_ev_clear(&event);
|
||||||
snd_seq_ev_set_direct(&event);
|
snd_seq_ev_set_direct(&event);
|
||||||
snd_seq_ev_set_source(&event, port_out);
|
snd_seq_ev_set_source(&event, port_out);
|
||||||
snd_seq_ev_set_dest(&event, MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port);
|
snd_seq_ev_set_subs(&event);
|
||||||
|
|
||||||
switch (evt & 0xF0) {
|
switch (evt & 0xF0) {
|
||||||
case MIDI_CMD_NOTE_OFF:
|
case MIDI_CMD_NOTE_OFF:
|
||||||
|
@ -1040,8 +1040,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||||
snd_seq_ev_clear(&event);
|
snd_seq_ev_clear(&event);
|
||||||
snd_seq_ev_set_direct(&event);
|
snd_seq_ev_set_direct(&event);
|
||||||
snd_seq_ev_set_source(&event, port_out);
|
snd_seq_ev_set_source(&event, port_out);
|
||||||
snd_seq_ev_set_dest(&event, MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port);
|
snd_seq_ev_set_subs(&event);
|
||||||
TRACE("destination %d:%d\n", MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port);
|
|
||||||
snd_seq_ev_set_sysex(&event, lpMidiHdr->dwBufferLength + len_add, lpNewData ? lpNewData : lpData);
|
snd_seq_ev_set_sysex(&event, lpMidiHdr->dwBufferLength + len_add, lpNewData ? lpNewData : lpData);
|
||||||
EnterCriticalSection(&midiSeqLock);
|
EnterCriticalSection(&midiSeqLock);
|
||||||
snd_seq_event_output_direct(midiSeq, &event);
|
snd_seq_event_output_direct(midiSeq, &event);
|
||||||
|
|
Loading…
Reference in New Issue