# music_driver.hpp

    00001 /* $Id: music_driver.hpp 11839 2008-01-13 21:41:24Z rubidium $ */
    00002
    00003 #ifndef MUSIC_MUSIC_DRIVER_HPP
    00004 #define MUSIC_MUSIC_DRIVER_HPP
    00005
    00006 #include "../driver.h"
    00007
    00008 class MusicDriver: public Driver {
    00009 public:
    00010   virtual void PlaySong(const char *filename) = 0;
    00011
    00012   virtual void StopSong() = 0;
    00013
    00014   virtual bool IsSongPlaying() = 0;
    00015
    00016   virtual void SetVolume(byte vol) = 0;
    00017 };
    00018
    00019 class MusicDriverFactoryBase: public DriverFactoryBase {
    00020 };
    00021
    00022 template <class T>
    00023 class MusicDriverFactory: public MusicDriverFactoryBase {
    00024 public:
    00025   MusicDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_MUSIC, ((T *)this)->priority); }
    00026
    00030   const char *GetName();
    00031 };
    00032
    00033 extern MusicDriver *_music_driver;
    00034 extern char _ini_musicdriver[32];
    00035
    00036 #endif /* MUSIC_MUSIC_DRIVER_HPP */