source:
code/branches/FICN/src/audio/AudioManager.cc
@
423
Last change on this file since 423 was 423, checked in by nicolape, 17 years ago | |
---|---|
File size: 832 bytes |
Rev | Line | |
---|---|---|
[349] | 1 | #include "AudioManager.h" |
2 | ||
3 | namespace audio | |
4 | { | |
5 | AudioManager::AudioManager() | |
6 | { | |
[419] | 7 | alutInit(NULL, 0); |
8 | ||
[423] | 9 | bgSound.open("ambient1"); |
10 | ||
11 | ||
12 | ||
[419] | 13 | bgSound.display(); |
[420] | 14 | |
[419] | 15 | if(!bgSound.playback()) |
16 | { | |
[423] | 17 | orxonox::Error("Ogg refused to play."); |
[419] | 18 | } |
[349] | 19 | } |
20 | ||
21 | AudioManager::~AudioManager() | |
22 | { | |
[419] | 23 | bgSound.release(); |
24 | alutExit(); | |
[349] | 25 | } |
26 | ||
[419] | 27 | void AudioManager::update() |
28 | { | |
[423] | 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 | } | |
[419] | 41 | } |
42 | ||
[349] | 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.