Duplicate stereo onto the side channels as well as the back
[openal-soft.git] / OpenAL32 / Include / alSource.h
blobb79f43d68afccd5bb17716f22601a9c2bba8cb7e
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;
51 ALenum DistanceModel;
53 ALuint ulBufferID;
55 ALboolean inuse;
56 ALboolean play;
57 ALenum state;
58 ALuint position;
59 ALuint position_fraction;
61 struct ALbufferlistitem *queue; // Linked list of buffers in queue
62 ALuint BuffersInQueue; // Number of buffers in queue
64 ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source
65 ALuint BuffersPlayed; // Number of buffers played on this loop
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 lOffset;
92 ALint lOffsetType;
94 // Source Type (Static, Streaming, or Undetermined)
95 ALint lSourceType;
97 // Current gains, which are ramped while mixed
98 ALfloat DryGains[OUTPUTCHANNELS];
99 ALfloat WetGain;
100 ALboolean FirstStart;
102 struct ALsource *next;
103 } ALsource;
105 ALvoid ReleaseALSources(ALCcontext *Context);
107 #ifdef __cplusplus
109 #endif
111 #endif