Use a function pointer for applying the dry mix post-process
[openal-soft.git] / OpenAL32 / Include / alListener.h
blob0d80a8d72fb88d7ef370bce24d60499cd2ef6dfe
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 ALcontextProps {
12 ALfloat DopplerFactor;
13 ALfloat DopplerVelocity;
14 ALfloat SpeedOfSound;
15 ALboolean SourceDistanceModel;
16 enum DistanceModel DistanceModel;
17 ALfloat MetersPerUnit;
19 ATOMIC(struct ALcontextProps*) next;
22 struct ALlistenerProps {
23 ALfloat Position[3];
24 ALfloat Velocity[3];
25 ALfloat Forward[3];
26 ALfloat Up[3];
27 ALfloat Gain;
29 ATOMIC(struct ALlistenerProps*) next;
32 typedef struct ALlistener {
33 alignas(16) ALfloat Position[3];
34 ALfloat Velocity[3];
35 ALfloat Forward[3];
36 ALfloat Up[3];
37 ALfloat Gain;
39 ATOMIC_FLAG PropsClean;
41 /* Pointer to the most recent property values that are awaiting an update.
43 ATOMIC(struct ALlistenerProps*) Update;
45 struct {
46 aluMatrixf Matrix;
47 aluVector Velocity;
49 ALfloat Gain;
50 ALfloat MetersPerUnit;
52 ALfloat DopplerFactor;
53 ALfloat SpeedOfSound; /* in units per sec! */
54 ALfloat ReverbSpeedOfSound; /* in meters per sec! */
56 ALboolean SourceDistanceModel;
57 enum DistanceModel DistanceModel;
58 } Params;
59 } ALlistener;
61 void UpdateListenerProps(ALCcontext *context);
63 #ifdef __cplusplus
65 #endif
67 #endif