Don't bother storing the loop points in the source
[openal-soft.git] / OpenAL32 / Include / alSource.h
blob0802cbaa5640ed01371b56b4d9aeb91ad4d103f5
1 #ifndef _AL_SOURCE_H_
2 #define _AL_SOURCE_H_
4 #define MAX_SENDS 2
6 #include "alFilter.h"
7 #include "alu.h"
8 #include "AL/al.h"
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
14 typedef enum {
15 POINT_RESAMPLER = 0,
16 LINEAR_RESAMPLER,
17 COSINE_RESAMPLER,
19 RESAMPLER_MAX,
20 RESAMPLER_MIN = -1,
21 RESAMPLER_DEFAULT = LINEAR_RESAMPLER
22 } resampler_t;
23 extern resampler_t DefaultResampler;
25 typedef struct ALbufferlistitem
27 struct ALbuffer *buffer;
28 struct ALbufferlistitem *next;
29 } ALbufferlistitem;
31 typedef struct ALsource
33 ALfloat flPitch;
34 ALfloat flGain;
35 ALfloat flOuterGain;
36 ALfloat flMinGain;
37 ALfloat flMaxGain;
38 ALfloat flInnerAngle;
39 ALfloat flOuterAngle;
40 ALfloat flRefDistance;
41 ALfloat flMaxDistance;
42 ALfloat flRollOffFactor;
43 ALfloat vPosition[3];
44 ALfloat vVelocity[3];
45 ALfloat vOrientation[3];
46 ALboolean bHeadRelative;
47 ALboolean bLooping;
48 ALenum DistanceModel;
50 resampler_t Resampler;
52 ALenum state;
53 ALuint position;
54 ALuint position_fraction;
56 struct ALbuffer *Buffer;
58 struct ALbufferlistitem *queue; // Linked list of buffers in queue
59 ALuint BuffersInQueue; // Number of buffers in queue
60 ALuint BuffersPlayed; // Number of buffers played on this loop
62 ALfilter DirectFilter;
64 struct {
65 struct ALeffectslot *Slot;
66 ALfilter WetFilter;
67 } Send[MAX_SENDS];
69 ALboolean DryGainHFAuto;
70 ALboolean WetGainAuto;
71 ALboolean WetGainHFAuto;
72 ALfloat OuterGainHF;
74 ALfloat AirAbsorptionFactor;
75 ALfloat RoomRolloffFactor;
76 ALfloat DopplerFactor;
78 ALint lOffset;
79 ALint lOffsetType;
81 // Source Type (Static, Streaming, or Undetermined)
82 ALint lSourceType;
84 // Current gains, which are ramped while mixed
85 ALfloat DryGains[OUTPUTCHANNELS];
86 ALfloat WetGains[MAX_SENDS];
87 ALboolean FirstStart;
89 // Current target parameters used for mixing
90 ALboolean NeedsUpdate;
91 struct {
92 ALfloat DryGains[OUTPUTCHANNELS];
93 ALfloat WetGains[MAX_SENDS];
94 ALfloat Pitch;
96 struct {
97 FILTER iirFilter;
98 ALfloat history[OUTPUTCHANNELS];
99 } Send[MAX_SENDS];
101 FILTER iirFilter;
102 ALfloat history[OUTPUTCHANNELS*2];
103 } Params;
105 // Index to itself
106 ALuint source;
107 } ALsource;
109 ALvoid ReleaseALSources(ALCcontext *Context);
111 #ifdef __cplusplus
113 #endif
115 #endif