winealsa.drv/midi.c: Adds the midi MTC Quarter Frame messages support[try2]
BACRI Stephane
stephanebacri at gmail.com
Tue Jun 14 02:36:03 CDT 2011
No html in the e-mail, for try2
>Here is a new version of the patch bringing MIDI MTC messages handling,
>including the surrounding code improvements suggested by J�rg Hoehle
>http://wine.1045685.n5.nabble.com/winealsa-drv-midi-c-Adds-the-midi-MTC-Quarter-Frame-messages-support-td4387453.html
>Corrects bug #26928
>Tested in several ways with hardware + software
>Regards.
---
dlls/winealsa.drv/midi.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 8bd048e..1e5b436 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -362,14 +362,17 @@ static DWORD WINAPI midRecThread(LPVOID arg)
toSend = 0xFC;
break;
case SND_SEQ_EVENT_SONGPOS:
- toSend = (((ev->data.control.value >> 7) & 0x7f)
<< 16) | ((ev->data.control.value & 0x7f) << 8) | 0xF2;
+ toSend = (((ev->data.control.value >> 7) & 0x7f)
<< 16) | ((ev->data.control.value & 0x7f) << 8) |
MIDI_CMD_COMMON_SONG_POS;
break;
case SND_SEQ_EVENT_SONGSEL:
- toSend = ((ev->data.control.value & 0x7f) << 8) | 0xF3;
+ toSend = ((ev->data.control.value & 0x7f) << 8) |
MIDI_CMD_COMMON_SONG_SELECT;
break;
case SND_SEQ_EVENT_RESET:
toSend = 0xFF;
break;
+ case SND_SEQ_EVENT_QFRAME:
+ toSend = ((ev->data.control.value & 0x7f) << 8) |
MIDI_CMD_COMMON_MTC_QUARTER;
+ break;
case SND_SEQ_EVENT_SYSEX:
{
int pos = 0;
@@ -864,7 +867,6 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
switch (evt & 0x0F) {
case 0x00: /* System Exclusive, don't do it on modData,
* should require modLongData*/
- case 0x01: /* Undefined */
case 0x04: /* Undefined. */
case 0x05: /* Undefined. */
case 0x07: /* End of Exclusive. */
@@ -890,6 +892,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
snd_seq_ev_set_sysex(&event, sizeof(reset_sysex_seq), reset_sysex_seq);
}
break;
+ case 0x01: /* MTC Quarter frame */
case 0x03: /* Song Select. */
{
BYTE buf[2];
--
1.7.4.1
More information about the wine-patches
mailing list