diff options
author | Jamieson Christian | 2006-02-27 01:59:07 +0000 |
---|---|---|
committer | Jamieson Christian | 2006-02-27 01:59:07 +0000 |
commit | 2469e00248423b7d0a8595d0870818c6ebfb40cf (patch) | |
tree | 3400500ba27325ba74215e27fc11a92f3b6b334c /backends/midi | |
parent | 2d2258f5965e0987f61b7667ab248965e770ac93 (diff) | |
download | scummvm-rg350-2469e00248423b7d0a8595d0870818c6ebfb40cf.tar.gz scummvm-rg350-2469e00248423b7d0a8595d0870818c6ebfb40cf.tar.bz2 scummvm-rg350-2469e00248423b7d0a8595d0870818c6ebfb40cf.zip |
SysEx data now passed around with const pointers. Permits simplification of some SysEx client code.
Testing on Windows. Developers on other platforms, please verify integrity of music handling in your respective MidiDrivers.
svn-id: r20952
Diffstat (limited to 'backends/midi')
-rw-r--r-- | backends/midi/alsa.cpp | 4 | ||||
-rw-r--r-- | backends/midi/coreaudio.cpp | 4 | ||||
-rw-r--r-- | backends/midi/coremidi.cpp | 4 | ||||
-rw-r--r-- | backends/midi/seq.cpp | 4 | ||||
-rw-r--r-- | backends/midi/windows.cpp | 4 | ||||
-rw-r--r-- | backends/midi/zodiac.cpp | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 406e52243b..5a109148a4 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -61,7 +61,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); private: void send_event(int do_flush); @@ -192,7 +192,7 @@ void MidiDriver_ALSA::send(uint32 b) { } } -void MidiDriver_ALSA::sysEx(byte *msg, uint16 length) { +void MidiDriver_ALSA::sysEx(const byte *msg, uint16 length) { unsigned char buf[1024]; if (length > 254) { diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index b6c4c0c9da..81b72387dd 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -56,7 +56,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); private: AUGraph _auGraph; @@ -177,7 +177,7 @@ void MidiDriver_CORE::send(uint32 b) { MusicDeviceMIDIEvent(_synth, status_byte, first_byte, second_byte, 0); } -void MidiDriver_CORE::sysEx(byte *msg, uint16 length) { +void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) { assert(_auGraph != NULL); // Add SysEx frame if missing diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index 598aaaba3f..d92f775a2d 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -50,7 +50,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); private: MIDIClientRef mClient; @@ -149,7 +149,7 @@ void MidiDriver_CoreMIDI::send(uint32 b) { MIDISend(mOutPort, mDest, &packetList); } -void MidiDriver_CoreMIDI::sysEx(byte *msg, uint16 length) { +void MidiDriver_CoreMIDI::sysEx(const byte *msg, uint16 length) { assert(mOutPort != NULL); assert(mDest != NULL); diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 9a0bf6b837..0a1458afd4 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -46,7 +46,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); private: bool _isOpen; @@ -140,7 +140,7 @@ void MidiDriver_SEQ::send(uint32 b) { write(device, buf, position); } -void MidiDriver_SEQ::sysEx (byte *msg, uint16 length) { +void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) { if (length > 254) { warning ("Cannot send SysEx block - data too large"); return; diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 2164f2a0c5..f03716f0eb 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -46,7 +46,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx (byte *msg, uint16 length); + void sysEx (const byte *msg, uint16 length); }; int MidiDriver_WIN::open() { @@ -89,7 +89,7 @@ void MidiDriver_WIN::send(uint32 b) { check_error(midiOutShortMsg(_mo, u.dwData)); } -void MidiDriver_WIN::sysEx(byte *msg, uint16 length) { +void MidiDriver_WIN::sysEx(const byte *msg, uint16 length) { if (!_isOpen) return; diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index 3ad4d88e50..1aa65139b5 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -35,7 +35,7 @@ public: int open(); void close(); void send(uint32 b); - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); private: TwMidiHandle _midiHandle; @@ -109,7 +109,7 @@ void MidiDriver_Zodiac::send(uint32 b) { } } -void MidiDriver_Zodiac::sysEx(byte *msg, uint16 length) { +void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { TwMidiSysEx(_midiHandle, 0, msg, length); } |