00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __SOUNDMANAGER_H__
00017 #define __SOUNDMANAGER_H__
00018
00019
00020 #include "../dependencies.h"
00021
00022
00023
00025 class SoundManager
00026 {
00027 public:
00028
00029
00031 SoundManager();
00033 ~SoundManager();
00034
00036 void init();
00038 void clear();
00039
00040
00043 void refAdd();
00046 void refRelease();
00047
00048
00050 f32 getGlobalVolume() const;
00054 sf::SoundBuffer* getSoundBuffer(const std::string &fileName);
00055
00058 bool loadSoundBuffer(const std::string &fileName);
00059
00061 void removeAll();
00064 bool removeSoundBuffer(const std::string &fileName);
00065
00068 void setGlobalVolume(f32 volume);
00069
00070 private:
00071
00072 std::map<std::string, sf::SoundBuffer*> mSoundBuffers;
00073
00074 };
00075
00076
00077
00079 extern void bindSoundManager(asIScriptEngine *engine);
00080
00081 #endif