extmidi.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef MUSIC_EXTERNAL_H
00013 #define MUSIC_EXTERNAL_H
00014
00015 #include "music_driver.hpp"
00016
00017 class MusicDriver_ExtMidi: public MusicDriver {
00018 private:
00019 char *command;
00020 char song[MAX_PATH];
00021 pid_t pid;
00022
00023 void DoPlay();
00024 void DoStop();
00025
00026 public:
00027 const char *Start(const char * const *param);
00028
00029 void Stop();
00030
00031 void PlaySong(const char *filename);
00032
00033 void StopSong();
00034
00035 bool IsSongPlaying();
00036
00037 void SetVolume(byte vol);
00038 const char *GetName() const { return "extmidi"; }
00039 };
00040
00041 class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> {
00042 public:
00043 static const int priority = 3;
00044 const char *GetName() { return "extmidi"; }
00045 const char *GetDescription() { return "External MIDI Driver"; }
00046 Driver *CreateInstance() { return new MusicDriver_ExtMidi(); }
00047 };
00048
00049 #endif