diff options
author | Nil Geisweiller <a-lin@sourceforge.net> | 2007-01-24 00:23:43 +0000 |
---|---|---|
committer | Nil Geisweiller <a-lin@sourceforge.net> | 2007-01-24 00:23:43 +0000 |
commit | 28d8288c5db18af00b10756be7941abf5eb247a9 (patch) | |
tree | a2dcc926d6dbcf43b7613f3149afce635c9e016c | |
parent | ce01924dbbe87cacbb0ca28023c3fc0fc91dcde6 (diff) |
fixed sysex dssi, added 0xF0 at beginning and 0xF7 at end of data
-rw-r--r-- | muse/muse/dssihost.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/muse/muse/dssihost.cpp b/muse/muse/dssihost.cpp index dfd3c0e7..b5456e3c 100644 --- a/muse/muse/dssihost.cpp +++ b/muse/muse/dssihost.cpp @@ -445,8 +445,13 @@ void DssiSynthIF::getData(MidiEventList* el, unsigned pos, int ch, unsigned samp int chn = e.channel(); int a = e.dataA(); int b = e.dataB(); - int len = e.len(); - unsigned char* d = e.data(); + //for sysex + QByteArray ba = QByteArray((const char*)e.data(), e.len()); + //we must had 0xF0 at the beginning and 0xF7 at the end of e.data() + ba.push_front(0xF0); + ba.push_back(0xF7); + int len = e.len() + 2; + snd_seq_event_t* event = &events[nevents]; event->queue = SND_SEQ_QUEUE_DIRECT; @@ -478,7 +483,8 @@ void DssiSynthIF::getData(MidiEventList* el, unsigned pos, int ch, unsigned samp snd_seq_ev_set_chanpress(event, chn, a); break; case ME_SYSEX: - snd_seq_ev_set_sysex(event, len, d); + snd_seq_ev_set_sysex(event, len, + (unsigned char*)ba.data()); break; default: --nevents; |