summaryrefslogtreecommitdiff
path: root/src/music/music_driver.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-05-02 16:14:23 +0000
committerrubidium <rubidium@openttd.org>2011-05-02 16:14:23 +0000
commit4d5dbf51707c42c24eeafdb65016b079c54adcf2 (patch)
tree0197dcc17f4a8411ecea2223f356019c902fe7b9 /src/music/music_driver.hpp
parente9837ff1ec1326aec622366ae29ff1aa81581daf (diff)
downloadopenttd-4d5dbf51707c42c24eeafdb65016b079c54adcf2.tar.xz
(svn r22410) -Document: some more bits ;)
Diffstat (limited to 'src/music/music_driver.hpp')
-rw-r--r--src/music/music_driver.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp
index c3f565866..70a1e37a5 100644
--- a/src/music/music_driver.hpp
+++ b/src/music/music_driver.hpp
@@ -14,20 +14,41 @@
#include "../driver.h"
+/** Driver for all music playback. */
class MusicDriver: public Driver {
public:
+ /**
+ * Play a particular song.
+ * @param filename The name of file with the song to play.
+ */
virtual void PlaySong(const char *filename) = 0;
+ /**
+ * Stop playing the current song.
+ */
virtual void StopSong() = 0;
+ /**
+ * Are we currently playing a song?
+ * @return True if a song is being played.
+ */
virtual bool IsSongPlaying() = 0;
+ /**
+ * Set the volume, if possible.
+ * @param vol The new volume.
+ */
virtual void SetVolume(byte vol) = 0;
};
+/** Base of the factory for the music drivers. */
class MusicDriverFactoryBase: public DriverFactoryBase {
};
+/**
+ * Factory for the music drivers.
+ * @tparam T The type of the music factory to register.
+ */
template <class T>
class MusicDriverFactory: public MusicDriverFactoryBase {
public: