From 2469e00248423b7d0a8595d0870818c6ebfb40cf Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Mon, 27 Feb 2006 01:59:07 +0000 Subject: 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 --- sound/softsynth/ym2612.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sound/softsynth/ym2612.cpp') diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index ae50e3011e..49f63abd63 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -150,7 +150,7 @@ public: void pitchBend(int16 value); void controlChange(byte control, byte value); void pitchBendFactor(byte value) { } - void sysEx_customInstrument(uint32 type, byte *instr); + void sysEx_customInstrument(uint32 type, const byte *instr); }; class MidiDriver_YM2612 : public MidiDriver_Emulated { @@ -179,7 +179,7 @@ public: uint32 property(int prop, uint32 param) { return 0; } void setPitchBendRange(byte channel, uint range) { } - void sysEx(byte *msg, uint16 length); + void sysEx(const byte *msg, uint16 length); MidiChannel *allocateChannel() { return 0; } MidiChannel *getPercussionChannel() { return 0; } @@ -675,7 +675,7 @@ void MidiChannel_YM2612::controlChange(byte control, byte value) { } } -void MidiChannel_YM2612::sysEx_customInstrument(uint32 type, byte *fmInst) { +void MidiChannel_YM2612::sysEx_customInstrument(uint32 type, const byte *fmInst) { if (type != 'EUP ') return; Voice2612 *voice = new Voice2612; @@ -798,7 +798,7 @@ void MidiDriver_YM2612::send(byte chan, uint32 b) { } } -void MidiDriver_YM2612::sysEx(byte *msg, uint16 length) { +void MidiDriver_YM2612::sysEx(const byte *msg, uint16 length) { if (msg[0] != 0x7C || msg[1] >= ARRAYSIZE(_channel)) return; _channel[msg[1]]->sysEx_customInstrument('EUP ', &msg[2]); -- cgit v1.2.3