1 #ifndef _AL_LISTENER_H_
2 #define _AL_LISTENER_H_
11 enum class DistanceModel
;
14 struct ALlistenerProps
{
21 std::atomic
<ALlistenerProps
*> next
;
25 ALfloat Position
[3]{0.0f
, 0.0f
, 0.0f
};
26 ALfloat Velocity
[3]{0.0f
, 0.0f
, 0.0f
};
27 ALfloat Forward
[3]{0.0f
, 0.0f
, -1.0f
};
28 ALfloat Up
[3]{0.0f
, 1.0f
, 0.0f
};
31 std::atomic_flag PropsClean
{true};
33 /* Pointer to the most recent property values that are awaiting an update.
35 std::atomic
<ALlistenerProps
*> Update
{nullptr};
42 ALfloat MetersPerUnit
;
44 ALfloat DopplerFactor
;
45 ALfloat SpeedOfSound
; /* in units per sec! */
46 ALfloat ReverbSpeedOfSound
; /* in meters per sec! */
48 ALboolean SourceDistanceModel
;
49 DistanceModel mDistanceModel
;
53 void UpdateListenerProps(ALCcontext
*context
);