equal
deleted
inserted
replaced
|
1 /* $Id$ */ |
|
2 |
|
3 #ifndef MUSIC_MUSIC_DRIVER_HPP |
|
4 #define MUSIC_MUSIC_DRIVER_HPP |
|
5 |
|
6 #include "../driver.h" |
|
7 |
|
8 class MusicDriver: public Driver { |
|
9 public: |
|
10 virtual void PlaySong(const char *filename) = 0; |
|
11 |
|
12 virtual void StopSong() = 0; |
|
13 |
|
14 virtual bool IsSongPlaying() = 0; |
|
15 |
|
16 virtual void SetVolume(byte vol) = 0; |
|
17 }; |
|
18 |
|
19 class MusicDriverFactoryBase: public DriverFactoryBase { |
|
20 }; |
|
21 |
|
22 template <class T> |
|
23 class MusicDriverFactory: public MusicDriverFactoryBase { |
|
24 public: |
|
25 MusicDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_MUSIC, ((T *)this)->priority); } |
|
26 |
|
27 /** |
|
28 * Get the long, human readable, name for the Driver-class. |
|
29 */ |
|
30 const char *GetName(); |
|
31 }; |
|
32 |
|
33 extern MusicDriver *_music_driver; |
|
34 |
|
35 #endif /* MUSIC_MUSIC_DRIVER_HPP */ |