SoundMgr.h

00001 #ifndef _ZAKSOUNDMGR_H_
00002 #define _ZAKSOUNDMGR_H_
00003 
00004 #include "irrKlang/irrKlang.h"
00005 #include <vector>
00006 #include "FileLog.h"
00007 #include "Messages.h"
00008 #include "Defines.h"
00009 #include "Sound.h"
00010 //#include "audiere.h"
00011 #include "list.h"
00012 #include "console.h"
00013 
00014 #pragma comment(lib, "irrKlang.lib")
00015 
00016 using namespace std;
00017 using namespace irr;
00018 using namespace audio;
00019 
00020 namespace zak {
00021 
00022 enum SOUND_TYPE {
00023         SNDTYPE_SOUND=0,
00024         SNDTYPE_MUSIC=1
00025 };
00026 
00118 class ZAKENGINE_API SoundMgr {
00119 public:
00120 
00125         static bool openDevice();
00126 
00134         static Sound *openSound(string& filename, bool stream,int type=(int)SNDTYPE_SOUND);
00135 
00140         static void closeSounds();
00141 
00146         static void setSoundActive(bool active) { _active = active; Sound::_active = active; }
00147 
00152         static bool getSoundActive() { return _active; }
00153 
00158         static void     setGlobalVolume(float volume);
00159 
00164         static float getGlobalVolume() { return _globalVolume; }
00165 
00170         static void     setSoundVolume(float volume);
00171 
00176         static float getSoundVolume() { return _soundVolume; }
00177 
00182         static void     setMusicVolume(float volume);
00183 
00188         static float getMusicVolume() { return _musicVolume; }
00189 
00190         static bool RegisterSoundMgr(char *className=NULL);
00191 
00192 private:
00193 
00194         static void logAudioDevices();
00195 
00196         static ISoundEngine* _pDevice;
00197         static bool _active;
00198         static List<Sound*> _musicList;
00199         static List<Sound*> _sndList;
00200         static float _soundVolume;
00201         static float _musicVolume;
00202         static float _globalVolume;
00203 
00204         friend class Game;
00205 };
00206 
00207 
00208 }
00209 
00210 #endif // _ZAKSOUND_H_

Generado el Tue May 29 14:46:15 2007 para Zak Engine v1.1.0 por  doxygen 1.5.1-p1