00001 #ifndef CAUDIOMANAGER_H_INCLUDED
00002 #define CAUDIOMANAGER_H_INCLUDED
00003 #include <map>
00004 #include <string>
00005 #include <vector>
00006 #include "cAudio.h"
00007 #include "cListener.h"
00008 #include "IAudioManager.h"
00009 namespace cAudio
00010 {
00011 class IAudio;
00012 class cAudioManager :public IAudioManager
00013 {
00014 public:
00015 void init(int argc,char* argv[]);
00016 void shutDown();
00017 void create(const std::string& identifier,const std::string& file,bool stream = false);
00018 void setListenerPos(float x,float y,float z);
00019 void update();
00020 IAudio *getSound(std::string identifier);
00021 void release();
00022
00023 static cAudioManager* Instance()
00024 {
00025 return &m_cAudioManager;
00026 }
00027
00028 protected:
00029 cAudioManager(){ }
00030
00031 private:
00032 static cAudioManager m_cAudioManager;
00033 std::map<std::string,cAudio*>audiomap;
00034 cListener initlistener;
00035
00036 };
00037 }
00038
00039 #endif // CAUDIOMANAGER_H_INCLUDED