From b92e643e9742765acd364bcbe30ebaedbe50400f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 20 Aug 2014 21:35:18 -0700 Subject: Use a NULL source for inactive activesources Also only access the activesource's source field once per update. --- OpenAL32/Include/alu.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenAL32/Include/alu.h') diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 7727c666..ac09f89f 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -41,6 +41,10 @@ extern "C" { #endif +struct ALsource; +struct ALactivesource; + + enum ActiveFilters { AF_None = 0, AF_LowPass = 1, @@ -216,10 +220,10 @@ inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxC } -ALvoid CalcSourceParams(struct ALactivesource *src, const ALCcontext *ALContext); -ALvoid CalcNonAttnSourceParams(struct ALactivesource *src, const ALCcontext *ALContext); +ALvoid CalcSourceParams(struct ALactivesource *src, const struct ALsource *source, const ALCcontext *ALContext); +ALvoid CalcNonAttnSourceParams(struct ALactivesource *src, const struct ALsource *source, const ALCcontext *ALContext); -ALvoid MixSource(struct ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo); +ALvoid MixSource(struct ALactivesource *src, struct ALsource *source, ALCdevice *Device, ALuint SamplesToDo); ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size); /* Caller must lock the device. */ -- cgit v1.2.3