diff options
Diffstat (limited to 'engines/hugo/sound.h')
-rw-r--r-- | engines/hugo/sound.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h index cdde8cc130..b8a7bf9678 100644 --- a/engines/hugo/sound.h +++ b/engines/hugo/sound.h @@ -34,52 +34,32 @@ #define HUGO_SOUND_H #include "audio/mixer.h" -#include "audio/mididrv.h" -#include "audio/midiparser.h" +#include "audio/midiplayer.h" #include "audio/softsynth/pcspk.h" namespace Hugo { -class MidiPlayer : public MidiDriver_BASE { +class MidiPlayer : public Audio::MidiPlayer { public: MidiPlayer(MidiDriver *driver); ~MidiPlayer(); - bool isPlaying() const; - int getVolume() const; - - void adjustVolume(int diff); void pause(bool p); void play(uint8 *stream, uint16 size); - void setChannelVolume(int channel); - void setLooping(bool loop); - void setVolume(int volume); void stop(); - void syncVolume(); void updateTimer(); - // MidiDriver_BASE interface - virtual void metaEvent(byte type, byte *data, uint16 length); - virtual void send(uint32 b); - int open(); uint32 getBaseTempo(); + // Overload Audio::MidiPlayer method + virtual void sendToChannel(byte channel, uint32 b); + private: static void timerCallback(void *p); - static const int kNumbChannels = 16; - - MidiDriver *_driver; - MidiParser *_parser; uint8 *_midiData; - bool _isLooping; - bool _isPlaying; bool _paused; - int _masterVolume; - MidiChannel *_channelsTable[kNumbChannels]; - uint8 _channelsVolume[kNumbChannels]; - Common::Mutex _mutex; }; class SoundHandler { |