14 extern enum Resampler DefaultResampler
;
16 extern const ALsizei ResamplerPadding
[ResamplerMax
];
17 extern const ALsizei ResamplerPrePadding
[ResamplerMax
];
20 typedef struct ALbufferlistitem
{
21 struct ALbuffer
*buffer
;
22 struct ALbufferlistitem
*next
;
23 struct ALbufferlistitem
*prev
;
27 typedef struct ALactivesource
{
28 struct ALsource
*Source
;
30 /** Method to update mixing parameters. */
31 ALvoid (*Update
)(struct ALactivesource
*self
, const ALCcontext
*context
);
33 /** Current target parameters used for mixing. */
38 ALuint Offset
; /* Number of output samples mixed since starting. */
41 SendParams Send
[MAX_SENDS
];
45 typedef struct ALsource
{
46 /** Source properties. */
47 volatile ALfloat Pitch
;
48 volatile ALfloat Gain
;
49 volatile ALfloat OuterGain
;
50 volatile ALfloat MinGain
;
51 volatile ALfloat MaxGain
;
52 volatile ALfloat InnerAngle
;
53 volatile ALfloat OuterAngle
;
54 volatile ALfloat RefDistance
;
55 volatile ALfloat MaxDistance
;
56 volatile ALfloat RollOffFactor
;
57 volatile ALfloat Position
[3];
58 volatile ALfloat Velocity
[3];
59 volatile ALfloat Orientation
[3];
60 volatile ALboolean HeadRelative
;
61 volatile ALboolean Looping
;
62 volatile enum DistanceModel DistanceModel
;
63 volatile ALboolean DirectChannels
;
65 volatile ALboolean DryGainHFAuto
;
66 volatile ALboolean WetGainAuto
;
67 volatile ALboolean WetGainHFAuto
;
68 volatile ALfloat OuterGainHF
;
70 volatile ALfloat AirAbsorptionFactor
;
71 volatile ALfloat RoomRolloffFactor
;
72 volatile ALfloat DopplerFactor
;
74 enum Resampler Resampler
;
77 * Last user-specified offset, and the offset type (bytes, samples, or
83 /** Source type (static, streaming, or undetermined) */
84 volatile ALint SourceType
;
86 /** Source state (initial, playing, paused, or stopped) */
87 volatile ALenum state
;
91 * Source offset in samples, relative to the currently playing buffer, NOT
92 * the whole queue, and the fractional (fixed-point) offset to the next
96 ALuint position_fraction
;
98 /** Source Buffer Queue info. */
99 ALbufferlistitem
*volatile queue
;
100 ALbufferlistitem
*volatile current_buffer
;
103 /** Current buffer sample info. */
107 /** Direct filter and auxiliary send info. */
116 struct ALeffectslot
*Slot
;
124 /** Source needs to update its mixing parameters. */
125 volatile ALenum NeedsUpdate
;
131 inline struct ALsource
*LookupSource(ALCcontext
*context
, ALuint id
)
132 { return (struct ALsource
*)LookupUIntMapKey(&context
->SourceMap
, id
); }
133 inline struct ALsource
*RemoveSource(ALCcontext
*context
, ALuint id
)
134 { return (struct ALsource
*)RemoveUIntMapKey(&context
->SourceMap
, id
); }
136 ALvoid
SetSourceState(ALsource
*Source
, ALCcontext
*Context
, ALenum state
);
137 ALboolean
ApplyOffset(ALsource
*Source
);
139 ALvoid
ReleaseALSources(ALCcontext
*Context
);