From e70fd59b3505619cccb6f3280a4cf0fb57aefa97 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 23 Mar 2011 16:14:39 +0100 Subject: ENGINES: Further simplify pseudo MidiDrivers; fix some regressions The regression affected AGOS and maybe some others; specifically, the real MidiDriver would have been deleted twice -- I previously missed that the Engine instances takes care of freeing the real MidiDriver, not the MidiPlayer wrapping it. This commit should clarify the ownership of the real MidiDriver for most pseudo MidiDrivers. --- engines/agos/midi.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'engines/agos/midi.h') diff --git a/engines/agos/midi.h b/engines/agos/midi.h index 01456d784e..64ab14d4ee 100644 --- a/engines/agos/midi.h +++ b/engines/agos/midi.h @@ -97,8 +97,7 @@ public: void loadXMIDI(Common::File *in, bool sfx = false); void loadS1D(Common::File *in, bool sfx = false); - void mapMT32toGM(bool map); - void setNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; } + bool hasNativeMT32() const { return _nativeMT32; } void setLoop(bool loop); void startTrack(int track); void queueTrack(int track, bool loop); @@ -113,13 +112,13 @@ public: void setDriver(MidiDriver *md); public: - // MidiDriver interface implementation - int open(); - void close(); - void send(uint32 b); - - void metaEvent(byte type, byte *data, uint16 length); + int open(int gameType); void setPassThrough(bool b) { _passThrough = b; } + + // MidiDriver_BASE interface implementation + virtual void send(uint32 b); + virtual void metaEvent(byte type, byte *data, uint16 length); + }; } // End of namespace AGOS -- cgit v1.2.3