aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h9
-rw-r--r--OpenAL32/Include/alSource.h14
2 files changed, 15 insertions, 8 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index b6986a07..8df5a4b9 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -567,10 +567,11 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans);
ALboolean IsValidType(ALenum type);
ALboolean IsValidChannels(ALenum type);
-#define HRTF_BITS (7)
-#define HRTF_LENGTH (1<<HRTF_BITS)
-#define HRTF_LENGTH_MASK (HRTF_LENGTH-1)
-void GetHrtfCoeffs(ALfloat elevation, ALfloat angle, const ALshort **left, const ALshort **right);
+#define HRIR_BITS (5)
+#define HRIR_LENGTH (1<<HRIR_BITS)
+#define HRIR_LENGTH_MASK (HRIR_LENGTH-1)
+void InitHrtf(void);
+void GetHrtfCoeffs(ALfloat elevation, ALfloat angle, const ALshort **left, const ALshort **right, ALuint *ldelay, ALuint *rdelay);
void al_print(const char *fname, unsigned int line, const char *fmt, ...)
PRINTF_STYLE(3,4);
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,