Line | |
---|
1 | #include "AudioManager.h" |
---|
2 | |
---|
3 | namespace audio |
---|
4 | { |
---|
5 | AudioManager::AudioManager() |
---|
6 | { |
---|
7 | alutInit(NULL, 0); |
---|
8 | |
---|
9 | bgSound.open("ambient1"); |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | bgSound.display(); |
---|
14 | |
---|
15 | if(!bgSound.playback()) |
---|
16 | { |
---|
17 | orxonox::Error("Ogg refused to play."); |
---|
18 | } |
---|
19 | } |
---|
20 | |
---|
21 | AudioManager::~AudioManager() |
---|
22 | { |
---|
23 | bgSound.release(); |
---|
24 | alutExit(); |
---|
25 | } |
---|
26 | |
---|
27 | void AudioManager::update() |
---|
28 | { |
---|
29 | |
---|
30 | if (bgSound.isLoaded()) |
---|
31 | { |
---|
32 | bgSound.update(); |
---|
33 | if(!bgSound.playing()) |
---|
34 | { |
---|
35 | if(!bgSound.playback()) |
---|
36 | orxonox::Error("Ogg abruptly stopped."); |
---|
37 | else |
---|
38 | orxonox::Error("Ogg stream was interrupted."); |
---|
39 | } |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | void AudioManager::setPos(std::vector<float> newPosition) |
---|
44 | { |
---|
45 | |
---|
46 | } |
---|
47 | |
---|
48 | void AudioManager::setSpeed(std::vector<float> newSpeed) |
---|
49 | { |
---|
50 | |
---|
51 | } |
---|
52 | |
---|
53 | void AudioManager::setOri(std::vector<float> at, std::vector<float> up) |
---|
54 | { |
---|
55 | |
---|
56 | } |
---|
57 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.