aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-19 13:14:11 -0700
committerChris Robinson <[email protected]>2014-03-19 13:14:11 -0700
commit6ee54fb1f3e050c6f49e5fef379c9b9f80e4683d (patch)
tree6764b47fe9a76728b78bb22233b76e6583cd9aec /OpenAL32/Include
parentd6f7aac1bbc2c51dbe53e30a50275d550a020df6 (diff)
Store some source mixing parameters in the active source struct
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alSource.h39
-rw-r--r--OpenAL32/Include/alu.h6
2 files changed, 21 insertions, 24 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index ecc62a37..3fb3e553 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -30,11 +30,6 @@ typedef struct ALbufferlistitem {
} ALbufferlistitem;
-typedef struct ALactivesource {
- struct ALsource *Source;
-} ALactivesource;
-
-
typedef struct HrtfState {
ALboolean Moving;
ALuint Counter;
@@ -84,6 +79,24 @@ typedef struct SendParams {
} SendParams;
+typedef struct ALactivesource {
+ struct ALsource *Source;
+
+ /** Method to update mixing parameters. */
+ ALvoid (*Update)(struct ALactivesource *self, const ALCcontext *context);
+
+ /** Current target parameters used for mixing. */
+ ResamplerFunc Resample;
+ DryMixerFunc DryMix;
+ WetMixerFunc WetMix;
+
+ ALint Step;
+
+ DirectParams Direct;
+ SendParams Send[MAX_SENDS];
+} ALactivesource;
+
+
typedef struct ALsource {
/** Source properties. */
volatile ALfloat Pitch;
@@ -159,28 +172,12 @@ typedef struct ALsource {
/** HRTF info. */
HrtfState Hrtf;
- /** Current target parameters used for mixing. */
- struct {
- ResamplerFunc Resample;
- DryMixerFunc DryMix;
- WetMixerFunc WetMix;
-
- ALint Step;
-
- DirectParams Direct;
-
- SendParams Send[MAX_SENDS];
- } Params;
/** Source needs to update its mixing parameters. */
volatile ALenum NeedsUpdate;
- /** Method to update mixing parameters. */
- ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
-
/** Self ID */
ALuint id;
} ALsource;
-#define ALsource_Update(s,a) ((s)->Update(s,a))
inline struct ALsource *LookupSource(ALCcontext *context, ALuint id)
{ return (struct ALsource*)LookupUIntMapKey(&context->SourceMap, id); }
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index d88e860c..f8174e0e 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -137,10 +137,10 @@ inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxC
}
-ALvoid CalcSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
-ALvoid CalcNonAttnSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
+ALvoid CalcSourceParams(struct ALactivesource *src, const ALCcontext *ALContext);
+ALvoid CalcNonAttnSourceParams(struct ALactivesource *src, const ALCcontext *ALContext);
-ALvoid MixSource(struct ALsource *Source, ALCdevice *Device, ALuint SamplesToDo);
+ALvoid MixSource(struct ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo);
ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size);
/* Caller must lock the device. */