# extmidi.h

Go to the documentation of this file.

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