11 #define DEFAULT_SENDS 2
21 typedef struct ALbufferlistitem
{
22 struct ALbuffer
*buffer
;
23 ATOMIC(struct ALbufferlistitem
*) next
;
27 typedef struct ALsource
{
28 /** Source properties. */
38 ALfloat RolloffFactor
;
42 ALfloat Orientation
[2][3];
43 ALboolean HeadRelative
;
45 enum DistanceModel DistanceModel
;
46 enum Resampler Resampler
;
47 ALboolean DirectChannels
;
48 enum SpatializeMode Spatialize
;
50 ALboolean DryGainHFAuto
;
51 ALboolean WetGainAuto
;
52 ALboolean WetGainHFAuto
;
55 ALfloat AirAbsorptionFactor
;
56 ALfloat RoomRolloffFactor
;
57 ALfloat DopplerFactor
;
59 /* NOTE: Stereo pan angles are specified in radians, counter-clockwise
60 * rather than clockwise.
66 /** Direct filter and auxiliary send info. */
75 struct ALeffectslot
*Slot
;
84 * Last user-specified offset, and the offset type (bytes, samples, or
90 /** Source type (static, streaming, or undetermined) */
93 /** Source state (initial, playing, paused, or stopped) */
96 /** Source Buffer Queue head. */
98 ALbufferlistitem
*queue
;
100 ATOMIC_FLAG PropsClean
;
106 inline void LockSourcesRead(ALCcontext
*context
)
107 { LockUIntMapRead(&context
->SourceMap
); }
108 inline void UnlockSourcesRead(ALCcontext
*context
)
109 { UnlockUIntMapRead(&context
->SourceMap
); }
110 inline void LockSourcesWrite(ALCcontext
*context
)
111 { LockUIntMapWrite(&context
->SourceMap
); }
112 inline void UnlockSourcesWrite(ALCcontext
*context
)
113 { UnlockUIntMapWrite(&context
->SourceMap
); }
115 inline struct ALsource
*LookupSource(ALCcontext
*context
, ALuint id
)
116 { return (struct ALsource
*)LookupUIntMapKeyNoLock(&context
->SourceMap
, id
); }
117 inline struct ALsource
*RemoveSource(ALCcontext
*context
, ALuint id
)
118 { return (struct ALsource
*)RemoveUIntMapKeyNoLock(&context
->SourceMap
, id
); }
120 void UpdateAllSourceProps(ALCcontext
*context
);
122 ALvoid
ReleaseALSources(ALCcontext
*Context
);