# music_driver.hpp

Go to the documentation of this file.

    00001 /* $Id: music_driver.hpp 14907 2009-01-08 11:06:07Z peter1138 $ */
    00002
    00005 #ifndef MUSIC_MUSIC_DRIVER_HPP
    00006 #define MUSIC_MUSIC_DRIVER_HPP
    00007
    00008 #include "../driver.h"
    00009
    00010 class MusicDriver: public Driver {
    00011 public:
    00012   virtual void PlaySong(const char *filename) = 0;
    00013
    00014   virtual void StopSong() = 0;
    00015
    00016   virtual bool IsSongPlaying() = 0;
    00017
    00018   virtual void SetVolume(byte vol) = 0;
    00019 };
    00020
    00021 class MusicDriverFactoryBase: public DriverFactoryBase {
    00022 };
    00023
    00024 template <class T>
    00025 class MusicDriverFactory: public MusicDriverFactoryBase {
    00026 public:
    00027   MusicDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_MUSIC, ((T *)this)->priority); }
    00028
    00032   const char *GetName();
    00033 };
    00034
    00035 extern MusicDriver *_music_driver;
    00036 extern char *_ini_musicdriver;
    00037
    00038 #endif /* MUSIC_MUSIC_DRIVER_HPP */