From: Tobias Gläßer Date: Tue, 20 Jul 2004 20:18:18 +0000 (+0000) Subject: added comments X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=450c450755e68527fd35b17242c71bffff951a6c;p=supertux.git added comments SVN-Revision: 1604 --- 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: