Update of /cvsroot/super-tux/supertux/lib/audio
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20820/lib/audio
Modified Files:
sound_manager.h
Log Message:
added comments
Index: sound_manager.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/audio/sound_manager.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sound_manager.h 20 Jul 2004 17:51:35 -0000 1.1
+++ sound_manager.h 20 Jul 2004 20:18:18 -0000 1.2
@@ -24,12 +24,12 @@
#include <map>
#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 @@
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:
|