Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/hud2/src/audio/AudioManager.h @ 1351

Last change on this file since 1351 was 919, checked in by rgrieder, 17 years ago
  • AudioManager is now Tickable
  • NPC update moved to its tick-function
  • corrected CMakeLists
  • added a few window properties to GraphicsEngine
  • OrxListener has been completely replaced
File size: 1.4 KB
Line 
1#ifndef _AudioManager_H__
2#define _AudioManager_H__
3
4#include "AudioIncludes.h"
5
6#include "core/Tickable.h"
7
8#include "AudioPrereqs.h"
9
10#include "AudioBuffer.h"
11#include "AudioSource.h"
12#include "AudioStream.h"
13
14namespace audio
15{
16  class _AudioExport AudioManager : public orxonox::Tickable
17        {
18        public:
19
20                // Init audio
21                AudioManager();
22
23                // Kill audio and set buffers, sources and memory free
24                ~AudioManager();
25
26                // Set listener position
27                void setPos(std::vector<float> newPosition);
28
29                // Set listener speed
30                void setSpeed(std::vector<float> newSpeed);
31
32                // Set listener orientation (first is direction
33                // the listener looks at, the second is the direction
34                // upwards the listener)
35                void setOri(std::vector<float> at, std::vector<float> up);
36
37                // Parses given xml string
38                void loadParams();
39
40                // Update
41                void tick(float dt);
42
43                void ambientAdd(std::string file);
44                void ambientStart();
45                void ambientStop();
46
47        private:
48
49                // Background sound
50    std::vector<AudioStream> bgSounds;
51                int currentBgSound;
52
53
54
55                std::string ambientPath;
56       
57                // Vector containing all audio files
58                std::vector<AudioBuffer> buffers;
59                // Vector containing all audio sources which referer to one buffer
60                std::vector<AudioSource> sources;
61                // The ambient background sound         
62                AudioSource ambient;
63               
64                std::vector<float> listenerPosition;
65                std::vector<float> listenerSpeed;
66                std::vector<float> listenerAt;
67                std::vector<float> listenerup;         
68        };     
69}
70
71#endif /* _AudioManager_H__ */
Note: See TracBrowser for help on using the repository browser.