blob: 8084e008de0d794a5671801176cc2b33da9511ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef NEBU_Sound_Source3D_H
#define NEBU_Sound_Source3D_H
#include "nebu_Sound.h"
#include "nebu_SoundSystem.h"
#include "nebu_SourceSample.h"
#include "base/nebu_Vector3.h"
#define USOUND 50
#define EPSILON 0.1f
#define SOUND_VOL_THRESHOLD 0.1
#define VOLSCALE_BASE 1000
namespace Sound {
class Source3D : public Source {
public:
Source3D(System *system, SourceSample *source) {
_system = system;
_source = source;
_location = Vector3(0,0,0);
_velocity = Vector3(0,0,0);
_position = 0;
};
Vector3 _location;
Vector3 _velocity;
SourceSample* _source;
virtual int Mix(Uint8 *data, int len);
virtual void GetModifiers(float &fPan, float &fVolume, float &fShift);
// protected:
int _position;
protected:
Source3D() {
_location = Vector3(0,0,0);
_velocity = Vector3(0,0,0);
_position = 0;
};
};
}
#endif
|