Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/audio/src/audio/AudioManager.h @ 349

Last change on this file since 349 was 349, checked in by nicolape, 16 years ago

Added AudioManager, AudioBuffer and AudioSource Class definitions

File size: 1.2 KB
Line 
1#ifndef AUDIOMANAGER_H_
2#define AUDIOMANAGER_H_
3
4#include <iostream>
5#include <string>
6#include <vector>
7
8#include "../../include/AL/al.h"
9#include "../../include/AL/alc.h"
10#include "../../include/AL/alut.h"
11
12#include "AudioBuffer.h"
13#include "AudioSource.h"
14
15namespace audio
16{
17        class AudioManager
18        {
19        public:
20                // Init audio
21                AudioManager();
22                // Kill audio and set buffers, sources and memory free
23                ~AudioManager();
24                // Set listener position
25                void setPos(std::vector<float> newPosition);
26                // Set listener speed
27                void setSpeed(std::vector<float> newSpeed);
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        private:
33                // Vector containing all audio files
34                std::vector<AudioBuffer> buffers;
35                // Vector containing all audio sources which referer to one buffer
36                std::vector<AudioSource> sources;
37                // The ambient background sound         
38                AudioSource ambient;
39               
40                std::vector<float> listenerPosition;
41                std::vector<float> listenerSpeed;
42                std::vector<float> listenerAt;
43                std::vector<float> listenerup;         
44        };     
45}
46
47#endif /*AUDIOMANAGER_H_*/
Note: See TracBrowser for help on using the repository browser.