Last change
on this file since 1002 was
790,
checked in by nicolasc, 17 years ago
|
merged FICN back into trunk
awaiting release.
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef _AudioManager_H__ |
---|
2 | #define _AudioManager_H__ |
---|
3 | |
---|
4 | #include "AudioIncludes.h" |
---|
5 | |
---|
6 | #include "AudioPrereqs.h" |
---|
7 | |
---|
8 | #include "AudioBuffer.h" |
---|
9 | #include "AudioSource.h" |
---|
10 | #include "AudioStream.h" |
---|
11 | |
---|
12 | namespace audio |
---|
13 | { |
---|
14 | class _AudioExport AudioManager |
---|
15 | { |
---|
16 | public: |
---|
17 | |
---|
18 | // Init audio |
---|
19 | AudioManager(); |
---|
20 | |
---|
21 | // Kill audio and set buffers, sources and memory free |
---|
22 | ~AudioManager(); |
---|
23 | |
---|
24 | // Set listener position |
---|
25 | void setPos(std::vector<float> newPosition); |
---|
26 | |
---|
27 | // Set listener speed |
---|
28 | void setSpeed(std::vector<float> newSpeed); |
---|
29 | |
---|
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); |
---|
34 | |
---|
35 | // Parses given xml string |
---|
36 | void loadParams(); |
---|
37 | |
---|
38 | // Update |
---|
39 | void update(); |
---|
40 | |
---|
41 | void ambientAdd(std::string file); |
---|
42 | void ambientStart(); |
---|
43 | void ambientStop(); |
---|
44 | |
---|
45 | private: |
---|
46 | |
---|
47 | // Background sound |
---|
48 | std::vector<AudioStream> bgSounds; |
---|
49 | int currentBgSound; |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | std::string ambientPath; |
---|
54 | |
---|
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 | |
---|
69 | #endif /* _AudioManager_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.