Commit missing changes
[openal-soft/openal-hmr.git] / OpenAL32 / Include / alSource.h
blob01c06b9131b9d3543748cd95923581472a492012
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 FILTER iirFilter;
73 } Send[MAX_SENDS];
75 ALboolean DryGainHFAuto;
76 ALboolean WetGainAuto;
77 ALboolean WetGainHFAuto;
78 ALfloat OuterGainHF;
80 FILTER iirFilter;
82 ALfloat AirAbsorptionFactor;
84 ALfloat RoomRolloffFactor;
86 ALfloat DopplerFactor;
88 // Index to itself
89 ALuint source;
91 ALint lBytesPlayed;
93 ALint lOffset;
94 ALint lOffsetType;
96 // Source Type (Static, Streaming, or Undetermined)
97 ALint lSourceType;
99 // Current gains, which are ramped while mixed
100 ALfloat DryGains[OUTPUTCHANNELS];
101 ALfloat WetGain;
103 struct ALsource *next;
104 } ALsource;
106 ALvoid ReleaseALSources(ALCcontext *Context);
108 #ifdef __cplusplus
110 #endif
112 #endif