Fix typo to get the proper minor ALC version
[openal-soft/openal-hmr.git] / OpenAL32 / Include / alSource.h
blob976921f98625d39bf2dd3499ed6dd07c498a8122
1 #ifndef _AL_SOURCE_H_
2 #define _AL_SOURCE_H_
4 #define AL_NUM_SOURCE_PARAMS 128
6 /* This cannot be changed without working on the code! */
7 #define MAX_SENDS 1
9 #include "alFilter.h"
10 #include "alu.h"
11 #include "AL/al.h"
13 #define AL_DIRECT_FILTER 0x20005
14 #define AL_AUXILIARY_SEND_FILTER 0x20006
15 #define AL_AIR_ABSORPTION_FACTOR 0x20007
16 #define AL_ROOM_ROLLOFF_FACTOR 0x20008
17 #define AL_CONE_OUTER_GAINHF 0x20009
18 #define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
19 #define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
20 #define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 typedef struct ALbufferlistitem
28 ALuint buffer;
29 ALuint bufferstate;
30 ALuint flag;
31 struct ALbufferlistitem *next;
32 } ALbufferlistitem;
34 typedef struct ALsource
36 ALfloat flPitch;
37 ALfloat flGain;
38 ALfloat flOuterGain;
39 ALfloat flMinGain;
40 ALfloat flMaxGain;
41 ALfloat flInnerAngle;
42 ALfloat flOuterAngle;
43 ALfloat flRefDistance;
44 ALfloat flMaxDistance;
45 ALfloat flRollOffFactor;
46 ALfloat vPosition[3];
47 ALfloat vVelocity[3];
48 ALfloat vOrientation[3];
49 ALboolean bHeadRelative;
50 ALboolean bLooping;
52 ALuint ulBufferID;
54 ALboolean inuse;
55 ALboolean play;
56 ALenum state;
57 ALuint position;
58 ALuint position_fraction;
60 struct ALbufferlistitem *queue; // Linked list of buffers in queue
61 ALuint BuffersInQueue; // Number of buffers in queue
63 ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source
64 ALuint BuffersPlayed; // Number of buffers played on this loop
65 ALuint BufferPosition; // Read position in audio data of current buffer
67 ALfilter DirectFilter;
69 struct {
70 struct ALeffectslot *Slot;
71 ALfilter WetFilter;
72 } Send[MAX_SENDS];
74 ALboolean DryGainHFAuto;
75 ALboolean WetGainAuto;
76 ALboolean WetGainHFAuto;
77 ALfloat OuterGainHF;
79 FILTER iirFilter;
81 ALfloat AirAbsorptionFactor;
83 ALfloat RoomRolloffFactor;
85 ALfloat DopplerFactor;
87 // Index to itself
88 ALuint source;
90 ALint lBytesPlayed;
92 ALint lOffset;
93 ALint lOffsetType;
95 // Source Type (Static, Streaming, or Undetermined)
96 ALint lSourceType;
98 // Current gains, which are ramped while mixed
99 ALfloat DryGains[OUTPUTCHANNELS];
100 ALfloat WetGains[OUTPUTCHANNELS];
101 ALfloat DryGainHF;
102 ALfloat WetGainHF;
104 struct ALsource *next;
105 } ALsource;
107 ALvoid ReleaseALSources(ALCcontext *Context);
109 #ifdef __cplusplus
111 #endif
113 #endif