diff options
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alSource.h | 39 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 6 |
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. */ |