aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-04-28 01:32:52 -0700
committerChris Robinson <[email protected]>2012-04-28 01:32:52 -0700
commit0a193c564585bb9080bc4fd905450141844e6eeb (patch)
treeb1c60ff5a3619cee27e121ed89abb051366fe822 /OpenAL32/Include
parent2450ee1723daddd8f0977f2589b45e126b1ae62a (diff)
Move the direct and send params into separate different types
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alSource.h56
1 files changed, 33 insertions, 23 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index badf4e18..53286a03 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -28,6 +28,14 @@ typedef struct ALbufferlistitem
struct ALbufferlistitem *prev;
} ALbufferlistitem;
+typedef struct HrtfState {
+ ALboolean Moving;
+ ALuint Counter;
+ ALfloat History[MAXCHANNELS][SRC_HISTORY_LENGTH];
+ ALfloat Values[MAXCHANNELS][HRIR_LENGTH][2];
+ ALuint Offset;
+} HrtfState;
+
typedef struct HrtfParams {
ALfloat Gain;
ALfloat Dir[3];
@@ -37,13 +45,27 @@ typedef struct HrtfParams {
ALint DelayStep[2];
} HrtfParams;
-typedef struct HrtfState {
- ALboolean Moving;
- ALuint Counter;
- ALfloat History[MAXCHANNELS][SRC_HISTORY_LENGTH];
- ALfloat Values[MAXCHANNELS][HRIR_LENGTH][2];
- ALuint Offset;
-} HrtfState;
+typedef struct DirectParams {
+ /* 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 Gains[MAXCHANNELS][MAXCHANNELS];
+
+ /* A low-pass filter, using 2 chained one-pole filters. */
+ FILTER iirFilter;
+ ALfloat history[MAXCHANNELS*2];
+} DirectParams;
+
+typedef struct SendParams {
+ /* Gain control, which applies to all input channels to a single (mono)
+ * output buffer. */
+ ALfloat Gain;
+
+ /* A low-pass filter, using a one-pole filter. */
+ FILTER iirFilter;
+ ALfloat history[MAXCHANNELS];
+} SendParams;
+
typedef struct ALsource
{
@@ -130,22 +152,10 @@ typedef struct ALsource
HrtfParams Hrtf;
- struct {
- /* 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 Gains[MAXCHANNELS][MAXCHANNELS];
-
- FILTER iirFilter;
- ALfloat history[MAXCHANNELS*2];
- } Direct;
-
- struct {
- struct ALeffectslot *Slot;
- ALfloat Gain;
- FILTER iirFilter;
- ALfloat history[MAXCHANNELS];
- } Send[MAX_SENDS];
+ DirectParams Direct;
+
+ struct ALeffectslot *Slot[MAX_SENDS];
+ SendParams Send[MAX_SENDS];
} Params;
/** Source needs to update its mixing parameters. */
volatile ALenum NeedsUpdate;