Remove redundant void argument list in function def
[openal-soft.git] / OpenAL32 / Include / alSource.h
blobac17fc0d9298d70f2d23a9b71152a3c551daad5d
1 #ifndef _AL_SOURCE_H_
2 #define _AL_SOURCE_H_
4 #include <array>
6 #include "alMain.h"
7 #include "alu.h"
8 #include "hrtf.h"
9 #include "almalloc.h"
10 #include "atomic.h"
12 #define DEFAULT_SENDS 2
14 struct ALbuffer;
15 struct ALsource;
16 struct ALeffectslot;
19 struct ALbufferlistitem {
20 std::atomic<ALbufferlistitem*> next;
21 ALsizei max_samples;
22 ALsizei num_buffers;
23 ALbuffer *buffers[];
27 struct ALsource {
28 /** Source properties. */
29 ALfloat Pitch;
30 ALfloat Gain;
31 ALfloat OuterGain;
32 ALfloat MinGain;
33 ALfloat MaxGain;
34 ALfloat InnerAngle;
35 ALfloat OuterAngle;
36 ALfloat RefDistance;
37 ALfloat MaxDistance;
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;
45 ALboolean Looping;
46 DistanceModel mDistanceModel;
47 Resampler mResampler;
48 ALboolean DirectChannels;
49 SpatializeMode mSpatialize;
51 ALboolean DryGainHFAuto;
52 ALboolean WetGainAuto;
53 ALboolean WetGainHFAuto;
54 ALfloat OuterGainHF;
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;
65 ALfloat Radius;
67 /** Direct filter and auxiliary send info. */
68 struct {
69 ALfloat Gain;
70 ALfloat GainHF;
71 ALfloat HFReference;
72 ALfloat GainLF;
73 ALfloat LFReference;
74 } Direct;
75 struct SendData {
76 ALeffectslot *Slot;
77 ALfloat Gain;
78 ALfloat GainHF;
79 ALfloat HFReference;
80 ALfloat GainLF;
81 ALfloat LFReference;
83 al::vector<SendData> Send;
85 /**
86 * Last user-specified offset, and the offset type (bytes, samples, or
87 * seconds).
89 ALdouble Offset;
90 ALenum OffsetType;
92 /** Source type (static, streaming, or undetermined) */
93 ALint SourceType;
95 /** Source state (initial, playing, paused, or stopped) */
96 ALenum state;
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.
106 ALint VoiceIdx;
108 /** Self ID */
109 ALuint id;
112 ALsource(ALsizei num_sends);
113 ~ALsource();
115 ALsource(const ALsource&) = delete;
116 ALsource& operator=(const ALsource&) = delete;
119 void UpdateAllSourceProps(ALCcontext *context);
121 #endif