blob: 096a747eeb0d214d0049eb17b8c7b306b283dc47 (
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
46
47
48
49
50
51
52
53
54
55
|
#ifndef _AL_LISTENER_H_
#define _AL_LISTENER_H_
#include "AL/alc.h"
#include "AL/al.h"
#include "AL/alext.h"
#include "atomic.h"
#include "vecmat.h"
enum class DistanceModel;
struct ALlistenerProps {
ALfloat Position[3];
ALfloat Velocity[3];
ALfloat Forward[3];
ALfloat Up[3];
ALfloat Gain;
ATOMIC(ALlistenerProps*) next;
};
struct ALlistener {
alignas(16) ALfloat Position[3];
ALfloat Velocity[3];
ALfloat Forward[3];
ALfloat Up[3];
ALfloat Gain;
ATOMIC(ALenum) PropsClean;
/* Pointer to the most recent property values that are awaiting an update.
*/
ATOMIC(ALlistenerProps*) Update;
struct {
aluMatrixf Matrix;
aluVector Velocity;
ALfloat Gain;
ALfloat MetersPerUnit;
ALfloat DopplerFactor;
ALfloat SpeedOfSound; /* in units per sec! */
ALfloat ReverbSpeedOfSound; /* in meters per sec! */
ALboolean SourceDistanceModel;
enum DistanceModel DistanceModel;
} Params;
};
void UpdateListenerProps(ALCcontext *context);
#endif
|