From 29847ea42da3e597d3496972c80ce49bea76da20 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 23 Mar 2011 15:23:26 +0100 Subject: AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses Many engines follow the advice in audio/midiparser.h and create a "pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny subset of the MidiDriver capabilities, namely those found in MidiDriver_BASE. So we try to subclass from that whenever possible; this allows us to remove many stub methods, and enables further future simplifications. --- engines/agos/midi.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'engines/agos/midi.h') diff --git a/engines/agos/midi.h b/engines/agos/midi.h index c27c5a7973..01456d784e 100644 --- a/engines/agos/midi.h +++ b/engines/agos/midi.h @@ -55,7 +55,7 @@ struct MusicInfo { } }; -class MidiPlayer : public MidiDriver { +class MidiPlayer : public MidiDriver_BASE { protected: Common::Mutex _mutex; MidiDriver *_driver; @@ -115,20 +115,11 @@ public: public: // MidiDriver interface implementation int open(); - bool isOpen() const; void close(); void send(uint32 b); void metaEvent(byte type, byte *data, uint16 length); void setPassThrough(bool b) { _passThrough = b; } - - // Timing functions - MidiDriver now operates timers - void setTimerCallback(void *timer_param, void (*timer_proc) (void *)) { } - uint32 getBaseTempo() { return _driver ? _driver->getBaseTempo() : 0; } - - // Channel allocation functions - MidiChannel *allocateChannel() { return 0; } - MidiChannel *getPercussionChannel() { return 0; } }; } // End of namespace AGOS -- cgit v1.2.3