00001 #ifndef _AUDIO_H_ 00002 #define _AUDIO_H_ 00003 00004 #include <iostream> 00005 #include <string> 00006 #include <vector> 00007 #include <map> 00008 using namespace std; 00009 00010 #include <AL/al.h> 00011 #include <AL/alut.h> 00012 00013 #include "OggStream.h" 00014 #include "Vector3.h" 00015 00020 class Audio 00021 { 00022 public: 00023 Audio(); 00024 virtual ~Audio(); 00025 00029 ALuint createSound(string filename, Vector3 position, Vector3 velocity); 00030 //ALuint createSound(string filename); 00031 OggStream *createSound(string filename); 00035 void deleteSound(ALuint buffer); 00039 void changePosition(ALuint buffer, Vector3 position); 00043 void changeListenerPosition(Vector3 position); 00044 00045 protected: 00046 ALuint _soundList[100]; 00047 int _numSounds; 00048 00049 vector < string> _soundNames; 00050 map < string, OggStream *> _soundMap; 00051 }; 00052 00053 #endif