Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/audio/AudioManager.h @ 708

Last change on this file since 708 was 708, checked in by rgrieder, 16 years ago
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
File size: 1.4 KB
Line 
1#ifndef _AudioManager_H__
2#define _AudioManager_H__
3
4#include "AudioIncludes.h"
5
6#include "AudioBuffer.h"
7#include "AudioSource.h"
8#include "AudioStream.h"
9
10namespace audio
11{
12        class AudioManager
13        {
14        public:
15
16                // Init audio
17                AudioManager();
18
19                // Kill audio and set buffers, sources and memory free
20                ~AudioManager();
21
22                // Set listener position
23                void setPos(std::vector<float> newPosition);
24
25                // Set listener speed
26                void setSpeed(std::vector<float> newSpeed);
27
28                // Set listener orientation (first is direction
29                // the listener looks at, the second is the direction
30                // upwards the listener)
31                void setOri(std::vector<float> at, std::vector<float> up);
32
33                // Parses given xml string
34                void loadParams();
35
36                // Update
37                void update();
38
39                void ambientAdd(orxonox::String file);
40                void ambientStart();
41                void ambientStop();
42
43        private:
44
45                // Background sound
46    std::vector<AudioStream> bgSounds;
47                int currentBgSound;
48
49
50
51                orxonox::String ambientPath;
52       
53                // Vector containing all audio files
54                std::vector<AudioBuffer> buffers;
55                // Vector containing all audio sources which referer to one buffer
56                std::vector<AudioSource> sources;
57                // The ambient background sound         
58                AudioSource ambient;
59               
60                std::vector<float> listenerPosition;
61                std::vector<float> listenerSpeed;
62                std::vector<float> listenerAt;
63                std::vector<float> listenerup;         
64        };     
65}
66
67#endif /* _AudioManager_H__ */
Note: See TracBrowser for help on using the repository browser.