From 450c450755e68527fd35b17242c71bffff951a6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Tue, 20 Jul 2004 20:18:18 +0000 Subject: [PATCH] added comments SVN-Revision: 1604 --- lib/audio/sound_manager.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/audio/sound_manager.h b/lib/audio/sound_manager.h index 4a7424450..1f615604a 100644 --- a/lib/audio/sound_manager.h +++ b/lib/audio/sound_manager.h @@ -24,12 +24,12 @@ #include #include "SDL_mixer.h" - #include "math/vector.h" class MusicRef; class MovingObject; +/// Sound manager /** This class handles all sounds that are played */ class SoundManager @@ -38,21 +38,37 @@ public: SoundManager(); ~SoundManager(); + /// Play sound. void play_sound(Mix_Chunk* sound); + /// Play sound relative to two Vectors. void play_sound(Mix_Chunk* sound, const Vector& pos, const Vector& pos2); + /// Play sound relative to a MovingObject and a Vector. void play_sound(Mix_Chunk* sound, const MovingObject* object, const Vector& pos); + /// Load music. + /** Is used to load the music for a MusicRef. */ MusicRef load_music(const std::string& file); + /// Test if a certain music file exists. bool exists_music(const std::string& filename); + /// Play music. + /** @Param loops: Defaults to -1, which means endless loops. */ void play_music(const MusicRef& music, int loops = -1); + + /// Halt music. void halt_music(); + /// Enable/Disable music. void enable_music(bool enable); private: // music part friend class MusicRef; + + /// Resource for music. + /** Contains the raw music data and + informations for music reference + counting. */ class MusicResource { public: -- 2.11.0