aboutsummaryrefslogtreecommitdiff
path: root/engines/touche/midi.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/touche/midi.h')
-rw-r--r--engines/touche/midi.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/engines/touche/midi.h b/engines/touche/midi.h
index bc5adc6b5f..f0f55e64e6 100644
--- a/engines/touche/midi.h
+++ b/engines/touche/midi.h
@@ -29,7 +29,7 @@
#include "common/util.h"
#include "common/mutex.h"
-#include "audio/mididrv.h"
+#include "audio/midiplayer.h"
class MidiParser;
@@ -39,44 +39,16 @@ namespace Common {
namespace Touche {
-class MidiPlayer : public MidiDriver_BASE {
+class MidiPlayer : public Audio::MidiPlayer {
public:
-
- enum {
- NUM_CHANNELS = 16
- };
-
MidiPlayer();
- ~MidiPlayer();
void play(Common::ReadStream &stream, int size, bool loop = false);
- void stop();
- void updateTimer();
void adjustVolume(int diff);
void setVolume(int volume);
- int getVolume() const { return _masterVolume; }
- void setLooping(bool loop) { _isLooping = loop; }
// MidiDriver_BASE interface
virtual void send(uint32 b);
- virtual void metaEvent(byte type, byte *data, uint16 length);
-
-private:
-
- static void timerCallback(void *p);
-
- MidiDriver *_driver;
- MidiParser *_parser;
- uint8 *_midiData;
- bool _isLooping;
- bool _isPlaying;
- int _masterVolume;
- bool _nativeMT32;
- MidiChannel *_channelsTable[NUM_CHANNELS];
- uint8 _channelsVolume[NUM_CHANNELS];
- Common::Mutex _mutex;
-
- static const uint8 _gmToRol[];
};
} // namespace Touche