comparison ext/openal-soft/OpenAL32/Include/alSource.h @ 0:4a0efb7baf70

* Datasets becomes the new trunk and retires after that :-)
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 29 Jun 2008 18:44:17 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4a0efb7baf70
1 #ifndef _AL_SOURCE_H_
2 #define _AL_SOURCE_H_
3
4 #define AL_NUM_SOURCE_PARAMS 128
5
6 /* This cannot be changed without working on the code! */
7 #define MAX_SENDS 1
8
9 #include "alFilter.h"
10 #include "AL/al.h"
11
12 #define AL_DIRECT_FILTER 0x20005
13 #define AL_AUXILIARY_SEND_FILTER 0x20006
14 #define AL_AIR_ABSORPTION_FACTOR 0x20007
15 #define AL_ROOM_ROLLOFF_FACTOR 0x20008
16 #define AL_CONE_OUTER_GAINHF 0x20009
17 #define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
18 #define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
19 #define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef struct ALbufferlistitem
26 {
27 ALuint buffer;
28 ALuint bufferstate;
29 ALuint flag;
30 struct ALbufferlistitem *next;
31 } ALbufferlistitem;
32
33 typedef struct ALsource
34 {
35 ALfloat flPitch;
36 ALfloat flGain;
37 ALfloat flOuterGain;
38 ALfloat flMinGain;
39 ALfloat flMaxGain;
40 ALfloat flInnerAngle;
41 ALfloat flOuterAngle;
42 ALfloat flRefDistance;
43 ALfloat flMaxDistance;
44 ALfloat flRollOffFactor;
45 ALfloat vPosition[3];
46 ALfloat vVelocity[3];
47 ALfloat vOrientation[3];
48 ALboolean bHeadRelative;
49 ALboolean bLooping;
50
51 ALuint ulBufferID;
52
53 ALboolean inuse;
54 ALboolean play;
55 ALenum state;
56 ALuint position;
57 ALuint position_fraction;
58 struct ALbufferlistitem *queue; // Linked list of buffers in queue
59 ALuint BuffersInQueue; // Number of buffers in queue
60 ALuint BuffersProcessed; // Number of buffers already processed (played)
61
62 ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source
63 ALuint BuffersPlayed; // Number of buffers played on this loop
64 ALuint BufferPosition; // Read position in audio data of current buffer
65
66 ALfilter DirectFilter;
67
68 struct {
69 struct ALeffectslot *Slot;
70 ALfilter WetFilter;
71 } Send[MAX_SENDS];
72
73 ALfloat LastDrySample;
74 ALfloat LastWetSample;
75
76 ALboolean DryGainHFAuto;
77 ALboolean WetGainAuto;
78 ALboolean WetGainHFAuto;
79 ALfloat OuterGainHF;
80
81 ALfloat AirAbsorptionFactor;
82
83 ALfloat RoomRolloffFactor;
84
85 // Index to itself
86 ALuint source;
87
88 ALint lBytesPlayed;
89
90 ALint lOffset;
91 ALint lOffsetType;
92
93 // Source Type (Static, Streaming, or Undetermined)
94 ALint lSourceType;
95
96 struct ALsource *next;
97 } ALsource;
98
99 ALvoid ReleaseALSources(ALCcontext *Context);
100
101 #ifdef __cplusplus
102 }
103 #endif
104
105 #endif