Avoid redundantly storing distance model settings
[openal-soft.git] / OpenAL32 / Include / alListener.h
bloba10d6728621a2c2a06ae5935c26c2b4bd8e58add
1 #ifndef _AL_LISTENER_H_
2 #define _AL_LISTENER_H_
4 #include "alMain.h"
5 #include "alu.h"
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 struct ALlistenerProps {
12 ATOMIC(ALfloat) Position[3];
13 ATOMIC(ALfloat) Velocity[3];
14 ATOMIC(ALfloat) Forward[3];
15 ATOMIC(ALfloat) Up[3];
16 ATOMIC(ALfloat) Gain;
17 ATOMIC(ALfloat) MetersPerUnit;
19 ATOMIC(ALfloat) DopplerFactor;
20 ATOMIC(ALfloat) DopplerVelocity;
21 ATOMIC(ALfloat) SpeedOfSound;
23 ATOMIC(struct ALlistenerProps*) next;
26 typedef struct ALlistener {
27 volatile ALfloat Position[3];
28 volatile ALfloat Velocity[3];
29 volatile ALfloat Forward[3];
30 volatile ALfloat Up[3];
31 volatile ALfloat Gain;
32 volatile ALfloat MetersPerUnit;
34 /* Pointer to the most recent property values that are awaiting an update.
36 ATOMIC(struct ALlistenerProps*) Update;
38 /* A linked list of unused property containers, free to use for future
39 * updates.
41 ATOMIC(struct ALlistenerProps*) FreeList;
43 struct {
44 aluMatrixf Matrix;
45 aluVector Velocity;
47 ALfloat Gain;
48 ALfloat MetersPerUnit;
50 ALfloat DopplerFactor;
51 ALfloat SpeedOfSound;
52 } Params;
53 } ALlistener;
55 void UpdateListenerProps(ALCcontext *context);
57 #ifdef __cplusplus
59 #endif
61 #endif