summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alSource.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-03 01:06:00 -0700
committerChris Robinson <[email protected]>2011-06-03 01:06:00 -0700
commit7ddfacb58f941b21da26b2749d3204307e3a0bbd (patch)
tree2cb41f7de025705f38a634781e6413c7c004829e /OpenAL32/Include/alSource.h
parentc7a80418d9291cad29dc293b95a5c328f4408b08 (diff)
Use a minimum phase HRTF data set
This reduces the coefficient size from 128 down to 32, with a set of delays
Diffstat (limited to 'OpenAL32/Include/alSource.h')
-rw-r--r--OpenAL32/Include/alSource.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 53d7f53c..0572cbc1 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -11,6 +11,10 @@
extern "C" {
#endif
+#define SRC_HISTORY_BITS (7)
+#define SRC_HISTORY_LENGTH (1<<SRC_HISTORY_BITS)
+#define SRC_HISTORY_MASK (SRC_HISTORY_LENGTH-1)
+
typedef enum {
POINT_RESAMPLER = 0,
LINEAR_RESAMPLER,
@@ -90,20 +94,21 @@ typedef struct ALsource
ALuint SampleSize;
/* HRTF info */
- ALfloat HrtfHistory[MAXCHANNELS][HRTF_LENGTH];
+ ALfloat HrtfHistory[MAXCHANNELS][SRC_HISTORY_LENGTH][2];
ALuint HrtfOffset;
- // Current target parameters used for mixing
- ALboolean NeedsUpdate;
+ /* Current target parameters used for mixing */
struct {
ALint Step;
- ALfloat HrtfCoeffs[MAXCHANNELS][HRTF_LENGTH][2];
+ ALfloat HrtfCoeffs[MAXCHANNELS][HRIR_LENGTH][2];
+ ALuint HrtfDelay[MAXCHANNELS][2];
/* A mixing matrix. First subscript is the channel number of the input
* data (regardless of channel configuration) and the second is the
* channel target (eg. FRONT_LEFT) */
ALfloat DryGains[MAXCHANNELS][MAXCHANNELS];
+
FILTER iirFilter;
ALfloat history[MAXCHANNELS*2];
@@ -113,6 +118,7 @@ typedef struct ALsource
ALfloat history[MAXCHANNELS];
} Send[MAX_SENDS];
} Params;
+ ALboolean NeedsUpdate;
ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
ALvoid (*DoMix)(struct ALsource *self, ALCdevice *Device,