Last change
on this file since 842 was
790,
checked in by nicolasc, 17 years ago
|
merged FICN back into trunk
awaiting release.
|
File size:
1.4 KB
|
Rev | Line | |
---|
[673] | 1 | #ifndef _AudioManager_H__ |
---|
| 2 | #define _AudioManager_H__ |
---|
[349] | 3 | |
---|
[409] | 4 | #include "AudioIncludes.h" |
---|
[349] | 5 | |
---|
[729] | 6 | #include "AudioPrereqs.h" |
---|
| 7 | |
---|
[349] | 8 | #include "AudioBuffer.h" |
---|
| 9 | #include "AudioSource.h" |
---|
[419] | 10 | #include "AudioStream.h" |
---|
[349] | 11 | |
---|
| 12 | namespace audio |
---|
| 13 | { |
---|
[729] | 14 | class _AudioExport AudioManager |
---|
[349] | 15 | { |
---|
| 16 | public: |
---|
[419] | 17 | |
---|
[349] | 18 | // Init audio |
---|
| 19 | AudioManager(); |
---|
[419] | 20 | |
---|
[349] | 21 | // Kill audio and set buffers, sources and memory free |
---|
| 22 | ~AudioManager(); |
---|
[419] | 23 | |
---|
[349] | 24 | // Set listener position |
---|
| 25 | void setPos(std::vector<float> newPosition); |
---|
[419] | 26 | |
---|
[349] | 27 | // Set listener speed |
---|
| 28 | void setSpeed(std::vector<float> newSpeed); |
---|
[419] | 29 | |
---|
[349] | 30 | // Set listener orientation (first is direction |
---|
| 31 | // the listener looks at, the second is the direction |
---|
| 32 | // upwards the listener) |
---|
| 33 | void setOri(std::vector<float> at, std::vector<float> up); |
---|
[419] | 34 | |
---|
[377] | 35 | // Parses given xml string |
---|
| 36 | void loadParams(); |
---|
[419] | 37 | |
---|
| 38 | // Update |
---|
| 39 | void update(); |
---|
| 40 | |
---|
[715] | 41 | void ambientAdd(std::string file); |
---|
[430] | 42 | void ambientStart(); |
---|
| 43 | void ambientStop(); |
---|
| 44 | |
---|
[349] | 45 | private: |
---|
[377] | 46 | |
---|
[430] | 47 | // Background sound |
---|
| 48 | std::vector<AudioStream> bgSounds; |
---|
| 49 | int currentBgSound; |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
[715] | 53 | std::string ambientPath; |
---|
[377] | 54 | |
---|
[349] | 55 | // Vector containing all audio files |
---|
| 56 | std::vector<AudioBuffer> buffers; |
---|
| 57 | // Vector containing all audio sources which referer to one buffer |
---|
| 58 | std::vector<AudioSource> sources; |
---|
| 59 | // The ambient background sound |
---|
| 60 | AudioSource ambient; |
---|
| 61 | |
---|
| 62 | std::vector<float> listenerPosition; |
---|
| 63 | std::vector<float> listenerSpeed; |
---|
| 64 | std::vector<float> listenerAt; |
---|
| 65 | std::vector<float> listenerup; |
---|
| 66 | }; |
---|
| 67 | } |
---|
| 68 | |
---|
[673] | 69 | #endif /* _AudioManager_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.