AuroraOpenALSoft/OpenAL32/Include/alSource.h

116 lines
2.5 KiB
C
Raw Normal View History

2007-11-14 02:02:18 +00:00
#ifndef _AL_SOURCE_H_
#define _AL_SOURCE_H_
#define MAX_SENDS 2
#include "alFilter.h"
#include "alu.h"
2007-11-14 02:02:18 +00:00
#include "AL/al.h"
#ifdef __cplusplus
extern "C" {
#endif
2010-01-11 13:37:20 +00:00
typedef enum {
2010-01-12 07:47:03 +00:00
POINT_RESAMPLER = 0,
LINEAR_RESAMPLER,
COSINE_RESAMPLER,
2010-01-11 13:37:20 +00:00
RESAMPLER_MAX,
RESAMPLER_MIN = -1,
2010-01-12 07:47:03 +00:00
RESAMPLER_DEFAULT = LINEAR_RESAMPLER
2010-01-11 13:37:20 +00:00
} resampler_t;
extern resampler_t DefaultResampler;
2007-11-14 02:02:18 +00:00
typedef struct ALbufferlistitem
{
struct ALbuffer *buffer;
2007-11-14 02:02:18 +00:00
struct ALbufferlistitem *next;
} ALbufferlistitem;
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;
ALenum DistanceModel;
2007-11-14 02:02:18 +00:00
2010-01-11 13:37:20 +00:00
resampler_t Resampler;
2007-11-14 02:02:18 +00:00
ALenum state;
ALuint position;
ALuint position_fraction;
2008-08-16 00:43:07 +00:00
struct ALbuffer *Buffer;
2007-11-14 02:02:18 +00:00
struct ALbufferlistitem *queue; // Linked list of buffers in queue
ALuint BuffersInQueue; // Number of buffers in queue
2009-07-08 04:01:41 +00:00
ALuint BuffersPlayed; // Number of buffers played on this loop
2007-11-14 02:02:18 +00:00
ALfilter DirectFilter;
2007-12-18 23:10:21 +00:00
struct {
struct ALeffectslot *Slot;
2007-12-18 23:10:21 +00:00
ALfilter WetFilter;
} Send[MAX_SENDS];
2007-12-18 23:10:21 +00:00
ALboolean DryGainHFAuto;
ALboolean WetGainAuto;
ALboolean WetGainHFAuto;
ALfloat OuterGainHF;
ALfloat AirAbsorptionFactor;
ALfloat RoomRolloffFactor;
ALfloat DopplerFactor;
2007-11-14 02:02:18 +00:00
ALint lOffset;
ALint lOffsetType;
// Source Type (Static, Streaming, or Undetermined)
ALint lSourceType;
// Current gains, which are ramped while mixed
ALfloat DryGains[OUTPUTCHANNELS];
2009-04-12 03:04:46 +00:00
ALfloat WetGains[MAX_SENDS];
ALboolean FirstStart;
// Current target parameters used for mixing
ALboolean NeedsUpdate;
struct {
ALfloat DryGains[OUTPUTCHANNELS];
ALfloat WetGains[MAX_SENDS];
ALfloat Pitch;
struct {
FILTER iirFilter;
ALfloat history[OUTPUTCHANNELS];
} Send[MAX_SENDS];
FILTER iirFilter;
ALfloat history[OUTPUTCHANNELS*2];
} Params;
// Index to itself
ALuint source;
2007-11-14 02:02:18 +00:00
} ALsource;
ALvoid ReleaseALSources(ALCcontext *Context);
2007-11-14 02:02:18 +00:00
#ifdef __cplusplus
}
#endif
#endif