12 #define DEFAULT_SENDS 2
19 struct ALbufferlistitem
{
20 std::atomic
<ALbufferlistitem
*> next
;
28 /** Source properties. */
38 ALfloat RolloffFactor
;
39 std::array
<ALfloat
,3> Position
;
40 std::array
<ALfloat
,3> Velocity
;
41 std::array
<ALfloat
,3> Direction
;
42 std::array
<ALfloat
,3> OrientAt
;
43 std::array
<ALfloat
,3> OrientUp
;
44 ALboolean HeadRelative
;
46 DistanceModel mDistanceModel
;
48 ALboolean DirectChannels
;
49 SpatializeMode mSpatialize
;
51 ALboolean DryGainHFAuto
;
52 ALboolean WetGainAuto
;
53 ALboolean WetGainHFAuto
;
56 ALfloat AirAbsorptionFactor
;
57 ALfloat RoomRolloffFactor
;
58 ALfloat DopplerFactor
;
60 /* NOTE: Stereo pan angles are specified in radians, counter-clockwise
61 * rather than clockwise.
63 std::array
<ALfloat
,2> StereoPan
;
67 /** Direct filter and auxiliary send info. */
83 al::vector
<SendData
> Send
;
86 * Last user-specified offset, and the offset type (bytes, samples, or
92 /** Source type (static, streaming, or undetermined) */
95 /** Source state (initial, playing, paused, or stopped) */
98 /** Source Buffer Queue head. */
99 ALbufferlistitem
*queue
;
101 std::atomic_flag PropsClean
{true};
103 /* Index into the context's Voices array. Lazily updated, only checked and
104 * reset when looking up the voice.
112 ALsource(ALsizei num_sends
);
115 ALsource(const ALsource
&) = delete;
116 ALsource
& operator=(const ALsource
&) = delete;
119 void UpdateAllSourceProps(ALCcontext
*context
);