extmidi.h
Go to the documentation of this file.00001
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 const char *Start(const char * const *param);
00021
00022 void Stop();
00023
00024 void PlaySong(const char *filename);
00025
00026 void StopSong();
00027
00028 bool IsSongPlaying();
00029
00030 void SetVolume(byte vol);
00031 };
00032
00033 class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> {
00034 public:
00035 static const int priority = 3;
00036 const char *GetName() { return "extmidi"; }
00037 const char *GetDescription() { return "External MIDI Driver"; }
00038 Driver *CreateInstance() { return new MusicDriver_ExtMidi(); }
00039 };
00040
00041 #endif