2007-11-14 02:02:18 +00:00
|
|
|
#ifndef _AL_SOURCE_H_
|
|
|
|
#define _AL_SOURCE_H_
|
|
|
|
|
|
|
|
#define AL_NUM_SOURCE_PARAMS 128
|
|
|
|
|
2007-12-19 02:13:49 +00:00
|
|
|
/* This cannot be changed without working on the code! */
|
|
|
|
#define MAX_SENDS 1
|
|
|
|
|
2007-12-18 00:28:16 +00:00
|
|
|
#include "alFilter.h"
|
2007-12-18 23:10:21 +00:00
|
|
|
#include "alAuxEffectSlot.h"
|
2007-11-14 02:02:18 +00:00
|
|
|
#include "AL/al.h"
|
|
|
|
|
2007-12-18 00:02:34 +00:00
|
|
|
#define AL_DIRECT_FILTER 0x20005
|
|
|
|
#define AL_AUXILIARY_SEND_FILTER 0x20006
|
|
|
|
#define AL_AIR_ABSORPTION_FACTOR 0x20007
|
|
|
|
#define AL_ROOM_ROLLOFF_FACTOR 0x20008
|
|
|
|
#define AL_CONE_OUTER_GAINHF 0x20009
|
|
|
|
#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
|
|
|
|
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
|
|
|
|
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
|
|
|
|
|
2007-11-14 02:02:18 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct ALbufferlistitem
|
|
|
|
{
|
|
|
|
ALuint buffer;
|
|
|
|
ALuint bufferstate;
|
|
|
|
ALuint flag;
|
|
|
|
struct ALbufferlistitem *next;
|
|
|
|
} ALbufferlistitem;
|
|
|
|
|
2007-12-31 09:09:21 +00:00
|
|
|
typedef struct ALsource
|
2007-11-14 02:02:18 +00:00
|
|
|
{
|
|
|
|
ALfloat flPitch;
|
|
|
|
ALfloat flGain;
|
|
|
|
ALfloat flOuterGain;
|
|
|
|
ALfloat flMinGain;
|
|
|
|
ALfloat flMaxGain;
|
|
|
|
ALfloat flInnerAngle;
|
|
|
|
ALfloat flOuterAngle;
|
|
|
|
ALfloat flRefDistance;
|
|
|
|
ALfloat flMaxDistance;
|
|
|
|
ALfloat flRollOffFactor;
|
|
|
|
ALfloat vPosition[3];
|
|
|
|
ALfloat vVelocity[3];
|
|
|
|
ALfloat vOrientation[3];
|
|
|
|
ALboolean bHeadRelative;
|
|
|
|
ALboolean bLooping;
|
|
|
|
|
|
|
|
ALuint ulBufferID;
|
|
|
|
|
|
|
|
ALboolean inuse;
|
|
|
|
ALboolean play;
|
|
|
|
ALenum state;
|
|
|
|
ALuint position;
|
|
|
|
ALuint position_fraction;
|
|
|
|
struct ALbufferlistitem *queue; // Linked list of buffers in queue
|
|
|
|
ALuint BuffersInQueue; // Number of buffers in queue
|
|
|
|
ALuint BuffersProcessed; // Number of buffers already processed (played)
|
|
|
|
|
|
|
|
ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source
|
|
|
|
ALuint BuffersPlayed; // Number of buffers played on this loop
|
|
|
|
ALuint BufferPosition; // Read position in audio data of current buffer
|
|
|
|
|
2007-12-18 00:28:16 +00:00
|
|
|
ALfilter DirectFilter;
|
|
|
|
|
2007-12-18 23:10:21 +00:00
|
|
|
struct {
|
2008-01-16 20:43:25 +00:00
|
|
|
ALeffectslot *Slot;
|
2007-12-18 23:10:21 +00:00
|
|
|
ALfilter WetFilter;
|
2007-12-19 02:13:49 +00:00
|
|
|
} Send[MAX_SENDS];
|
2007-12-18 23:10:21 +00:00
|
|
|
|
2007-12-18 05:00:52 +00:00
|
|
|
ALfloat LastDrySample;
|
|
|
|
ALfloat LastWetSample;
|
|
|
|
|
2007-12-18 05:33:05 +00:00
|
|
|
ALboolean DryGainHFAuto;
|
2007-12-19 03:13:41 +00:00
|
|
|
ALboolean WetGainAuto;
|
2007-12-19 00:54:22 +00:00
|
|
|
ALboolean WetGainHFAuto;
|
2007-12-18 05:56:31 +00:00
|
|
|
ALfloat OuterGainHF;
|
2007-12-18 05:33:05 +00:00
|
|
|
|
2007-12-18 21:37:07 +00:00
|
|
|
ALfloat AirAbsorptionFactor;
|
|
|
|
|
2007-12-19 03:03:40 +00:00
|
|
|
ALfloat RoomRolloffFactor;
|
|
|
|
|
2007-11-14 02:02:18 +00:00
|
|
|
// Index to itself
|
|
|
|
ALuint source;
|
|
|
|
|
|
|
|
ALint lBytesPlayed;
|
|
|
|
|
|
|
|
ALint lOffset;
|
|
|
|
ALint lOffsetType;
|
|
|
|
|
|
|
|
// Source Type (Static, Streaming, or Undetermined)
|
|
|
|
ALint lSourceType;
|
|
|
|
|
2007-12-31 09:09:21 +00:00
|
|
|
struct ALsource *next;
|
2007-11-14 02:02:18 +00:00
|
|
|
} ALsource;
|
|
|
|
|
2008-01-16 21:27:15 +00:00
|
|
|
ALvoid ReleaseALSources(ALCcontext *Context);
|
|
|
|
|
2007-11-14 02:02:18 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|