aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJamieson Christian2003-06-01 01:45:08 +0000
committerJamieson Christian2003-06-01 01:45:08 +0000
commitf047955b0dcd4dd5dd477626bd3f7d5672a09f21 (patch)
tree395db9007ec0ef2f1581413ebc1f58a7da07e8d2 /backends
parent7a2a739ea33dc6092417bf52cfaf12934bb34334 (diff)
downloadscummvm-rg350-f047955b0dcd4dd5dd477626bd3f7d5672a09f21.tar.gz
scummvm-rg350-f047955b0dcd4dd5dd477626bd3f7d5672a09f21.tar.bz2
scummvm-rg350-f047955b0dcd4dd5dd477626bd3f7d5672a09f21.zip
Restored SEQ_MIDIPUTC SysEx approach
svn-id: r8208
Diffstat (limited to 'backends')
-rw-r--r--backends/midi/seq.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index 9bb0aaab5a..3f17918920 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -38,7 +38,6 @@
////////////////////////////////////////
#define SEQ_MIDIPUTC 5
-#define EV_SYSEX 0x94
class MidiDriver_SEQ : public MidiDriver_MPU401 {
public:
@@ -142,16 +141,14 @@ void MidiDriver_SEQ::sysEx (byte *msg, uint16 length) {
unsigned char buf [1024];
int position = 0;
byte *chr = msg;
-/*
- // Should we be using EV_SYSEX instead of SEQ_MIDIPUTC?
- // I'm not sure how to send EV_SYSEX.
+
buf[position++] = SEQ_MIDIPUTC;
buf[position++] = 0xFF;
buf[position++] = _device_num;
buf[position++] = 0;
for (; length; --length, ++chr) {
buf[position++] = SEQ_MIDIPUTC;
- buf[position++] = (unsigned char) *chr;
+ buf[position++] = (unsigned char) *chr & 0x7F;
buf[position++] = _device_num;
buf[position++] = 0;
}
@@ -159,24 +156,6 @@ void MidiDriver_SEQ::sysEx (byte *msg, uint16 length) {
buf[position++] = 0xF7;
buf[position++] = _device_num;
buf[position++] = 0;
-*/
- buf[position++] = EV_SYSEX;
- buf[position++] = _device_num;
- buf[position++] = 0xF0;
- for (; length; --length, ++chr) {
- if (position % 8 == 0) {
- buf[position++] = EV_SYSEX;
- buf[position++] = _device_num;
- }
- buf[position++] = *chr & 0x7F;
- }
- if (position % 8 == 0) {
- buf[position++] = EV_SYSEX;
- buf[position++] = _device_num;
- }
- buf[position++] = 0xF7;
- while (position % 8 != 0)
- buf[position++] = 0xFF; // Filler bytes
write (device, buf, position);
}