diff options
author | D G Turner | 2019-06-03 19:35:48 +0100 |
---|---|---|
committer | D G Turner | 2019-06-03 19:35:48 +0100 |
commit | 3a0ed17e66e01d8b5175904ed821244be8b278b8 (patch) | |
tree | 74b899ca67aacadb762ebe999c6305e261808553 /engines/agos/drivers/accolade/mt32.cpp | |
parent | e65bfad30e6fefb71087633c380c368b965620d6 (diff) | |
download | scummvm-rg350-3a0ed17e66e01d8b5175904ed821244be8b278b8.tar.gz scummvm-rg350-3a0ed17e66e01d8b5175904ed821244be8b278b8.tar.bz2 scummvm-rg350-3a0ed17e66e01d8b5175904ed821244be8b278b8.zip |
AGOS: Fix Accolade MIDI Driver Compilation Breakage
These were broken by the last PR merge which included a cpp file in a
way which will not build reliably. This splits the Accolade MIDI driver
structure definitions into headers allowing these to be included
instead.
Also, minor cleanup by removal of unused header includes.
Diffstat (limited to 'engines/agos/drivers/accolade/mt32.cpp')
-rw-r--r-- | engines/agos/drivers/accolade/mt32.cpp | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/engines/agos/drivers/accolade/mt32.cpp b/engines/agos/drivers/accolade/mt32.cpp index 321b95f4ca..0b4ca35fca 100644 --- a/engines/agos/drivers/accolade/mt32.cpp +++ b/engines/agos/drivers/accolade/mt32.cpp @@ -21,70 +21,14 @@ */ #include "agos/drivers/accolade/mididriver.h" +#include "agos/drivers/accolade/mt32.h" #include "audio/mididrv.h" #include "common/config-manager.h" -#include "common/file.h" -#include "common/mutex.h" -#include "common/system.h" -#include "common/textconsole.h" namespace AGOS { -class MidiDriver_Accolade_MT32 : public MidiDriver { -public: - MidiDriver_Accolade_MT32(); - virtual ~MidiDriver_Accolade_MT32(); - - // MidiDriver - int open(); - void close(); - bool isOpen() const { return _isOpen; } - - void send(uint32 b); - - MidiChannel *allocateChannel() { - if (_driver) - return _driver->allocateChannel(); - return NULL; - } - MidiChannel *getPercussionChannel() { - if (_driver) - return _driver->getPercussionChannel(); - return NULL; - } - - void setTimerCallback(void *timer_param, Common::TimerManager::TimerProc timer_proc) { - if (_driver) - _driver->setTimerCallback(timer_param, timer_proc); - } - - uint32 getBaseTempo() { - if (_driver) { - return _driver->getBaseTempo(); - } - return 1000000 / _baseFreq; - } - -protected: - Common::Mutex _mutex; - MidiDriver *_driver; - bool _nativeMT32; // native MT32, may also be our MUNT, or MUNT over MIDI - - bool _isOpen; - int _baseFreq; - -private: - // simple mapping between MIDI channel and MT32 channel - byte _channelMapping[AGOS_MIDI_CHANNEL_COUNT]; - // simple mapping between MIDI instruments and MT32 instruments - byte _instrumentMapping[AGOS_MIDI_INSTRUMENT_COUNT]; - -public: - bool setupInstruments(byte *instrumentData, uint16 instrumentDataSize, bool useMusicDrvFile); -}; - MidiDriver_Accolade_MT32::MidiDriver_Accolade_MT32() { _driver = NULL; _isOpen = false; |