# extmidi.h

    00001 /* $Id: extmidi.h 10471 2007-07-07 20:31:23Z peter1138 $ */
    00002
    00003 #ifndef MUSIC_EXTERNAL_H
    00004 #define MUSIC_EXTERNAL_H
    00005
    00006 #include "music_driver.hpp"
    00007
    00008 class MusicDriver_ExtMidi: public MusicDriver {
    00009 private:
    00010   char song[MAX_PATH];
    00011   pid_t pid;
    00012
    00013   void DoPlay();
    00014   void DoStop();
    00015
    00016 public:
    00017   /* virtual */ const char *Start(const char * const *param);
    00018
    00019   /* virtual */ void Stop();
    00020
    00021   /* virtual */ void PlaySong(const char *filename);
    00022
    00023   /* virtual */ void StopSong();
    00024
    00025   /* virtual */ bool IsSongPlaying();
    00026
    00027   /* virtual */ void SetVolume(byte vol);
    00028 };
    00029
    00030 class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> {
    00031 public:
    00032   static const int priority = 1;
    00033   /* virtual */ const char *GetName() { return "extmidi"; }
    00034   /* virtual */ const char *GetDescription() { return "External MIDI Driver"; }
    00035   /* virtual */ Driver *CreateInstance() { return new MusicDriver_ExtMidi(); }
    00036 };
    00037
    00038 #endif /* MUSIC_EXTERNAL_H */