Changeset 1784 for code/trunk/src/audio/AudioManager.h
- Timestamp:
- Sep 15, 2008, 10:54:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/audio/AudioManager.h
r1747 r1784 37 37 namespace audio 38 38 { 39 class _AudioExport AudioManager 40 { 41 public: 39 class _AudioExport AudioManager 40 { 41 public: 42 // Init audio 43 AudioManager(); 42 44 43 // Init audio 44 45 // Kill audio and set buffers, sources and memory free 46 ~AudioManager(); 45 47 46 // Kill audio and set buffers, sources and memory free 47 ~AudioManager();48 // Set listener position 49 void setPos(std::vector<float> newPosition); 48 50 49 // Set listener position 50 void setPos(std::vector<float> newPosition);51 // Set listener speed 52 void setSpeed(std::vector<float> newSpeed); 51 53 52 // Set listener speed 53 void setSpeed(std::vector<float> newSpeed); 54 // Set listener orientation (first is direction 55 // the listener looks at, the second is the direction 56 // upwards the listener) 57 void setOri(std::vector<float> at, std::vector<float> up); 54 58 55 // Set listener orientation (first is direction 56 // the listener looks at, the second is the direction 57 // upwards the listener) 58 void setOri(std::vector<float> at, std::vector<float> up); 59 // Update 60 void tick(float dt); 59 61 60 // Update 61 void tick(float dt); 62 void ambientAdd(std::string file); 63 void ambientStart(); 64 void ambientStop(); 62 65 63 void ambientAdd(std::string file); 64 void ambientStart(); 65 void ambientStop(); 66 67 private: 68 69 // Background sound 70 std::vector<AudioStream*> bgSounds; 71 int currentBgSound; 66 private: 67 // Background sound 68 std::vector<AudioStream*> bgSounds; 69 int currentBgSound; 72 70 73 71 72 std::string ambientPath; 74 73 75 std::string ambientPath; 74 // Vector containing all audio files 75 std::vector<AudioBuffer*> buffers; 76 // Vector containing all audio sources which referer to one buffer 77 std::vector<AudioSource*> sources; 78 // The ambient background sound 79 AudioSource* ambient; 76 80 77 // Vector containing all audio files 78 std::vector<AudioBuffer*> buffers; 79 // Vector containing all audio sources which referer to one buffer 80 std::vector<AudioSource*> sources; 81 // The ambient background sound 82 AudioSource* ambient; 83 84 std::vector<float> listenerPosition; 85 std::vector<float> listenerSpeed; 86 std::vector<float> listenerAt; 87 std::vector<float> listenerup; 88 }; 81 std::vector<float> listenerPosition; 82 std::vector<float> listenerSpeed; 83 std::vector<float> listenerAt; 84 std::vector<float> listenerup; 85 }; 89 86 } 90 87
Note: See TracChangeset
for help on using the changeset viewer.