diff options
author | rubidium <rubidium@openttd.org> | 2011-05-02 16:14:23 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-02 16:14:23 +0000 |
commit | 4d5dbf51707c42c24eeafdb65016b079c54adcf2 (patch) | |
tree | 0197dcc17f4a8411ecea2223f356019c902fe7b9 /src/sound | |
parent | e9837ff1ec1326aec622366ae29ff1aa81581daf (diff) | |
download | openttd-4d5dbf51707c42c24eeafdb65016b079c54adcf2.tar.xz |
(svn r22410) -Document: some more bits ;)
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/allegro_s.h | 2 | ||||
-rw-r--r-- | src/sound/null_s.h | 2 | ||||
-rw-r--r-- | src/sound/sdl_s.h | 2 | ||||
-rw-r--r-- | src/sound/sound_driver.hpp | 8 | ||||
-rw-r--r-- | src/sound/win32_s.h | 2 |
5 files changed, 15 insertions, 1 deletions
diff --git a/src/sound/allegro_s.h b/src/sound/allegro_s.h index cca292b16..315bad2a8 100644 --- a/src/sound/allegro_s.h +++ b/src/sound/allegro_s.h @@ -14,6 +14,7 @@ #include "sound_driver.hpp" +/** Implementation of the allegro sound driver. */ class SoundDriver_Allegro: public SoundDriver { public: /* virtual */ const char *Start(const char * const *param); @@ -24,6 +25,7 @@ public: /* virtual */ const char *GetName() const { return "allegro"; } }; +/** Factory for the allegro sound driver. */ class FSoundDriver_Allegro: public SoundDriverFactory<FSoundDriver_Allegro> { public: static const int priority = 4; diff --git a/src/sound/null_s.h b/src/sound/null_s.h index 34f12e70e..5951842cb 100644 --- a/src/sound/null_s.h +++ b/src/sound/null_s.h @@ -14,6 +14,7 @@ #include "sound_driver.hpp" +/** Implementation of the null sound driver. */ class SoundDriver_Null: public SoundDriver { public: /* virtual */ const char *Start(const char * const *param) { return NULL; } @@ -22,6 +23,7 @@ public: /* virtual */ const char *GetName() const { return "null"; } }; +/** Factory for the null sound driver. */ class FSoundDriver_Null: public SoundDriverFactory<FSoundDriver_Null> { public: static const int priority = 1; diff --git a/src/sound/sdl_s.h b/src/sound/sdl_s.h index d8a4d587d..6733ee6a7 100644 --- a/src/sound/sdl_s.h +++ b/src/sound/sdl_s.h @@ -14,6 +14,7 @@ #include "sound_driver.hpp" +/** Implementation of the SDL sound driver. */ class SoundDriver_SDL: public SoundDriver { public: /* virtual */ const char *Start(const char * const *param); @@ -22,6 +23,7 @@ public: /* virtual */ const char *GetName() const { return "sdl"; } }; +/** Factory for the SDL sound driver. */ class FSoundDriver_SDL: public SoundDriverFactory<FSoundDriver_SDL> { public: static const int priority = 5; diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp index c8225922c..56664e6ad 100644 --- a/src/sound/sound_driver.hpp +++ b/src/sound/sound_driver.hpp @@ -14,15 +14,21 @@ #include "../driver.h" +/** Base for all sound drivers. */ class SoundDriver: public Driver { public: - /* Called once every tick */ + /** Called once every tick */ virtual void MainLoop() {} }; +/** Base of the factory for the sound drivers. */ class SoundDriverFactoryBase: public DriverFactoryBase { }; +/** + * Factory for the sound drivers. + * @tparam T The type of the sound factory to register. + */ template <class T> class SoundDriverFactory: public SoundDriverFactoryBase { public: diff --git a/src/sound/win32_s.h b/src/sound/win32_s.h index c75d07594..03af04a53 100644 --- a/src/sound/win32_s.h +++ b/src/sound/win32_s.h @@ -14,6 +14,7 @@ #include "sound_driver.hpp" +/** Implementation of the sound driver for Windows. */ class SoundDriver_Win32: public SoundDriver { public: /* virtual */ const char *Start(const char * const *param); @@ -22,6 +23,7 @@ public: /* virtual */ const char *GetName() const { return "win32"; } }; +/** Factory for the sound driver for Windows. */ class FSoundDriver_Win32: public SoundDriverFactory<FSoundDriver_Win32> { public: static const int priority = 10; |