aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-08-03 23:10:00 -0700
committerChris Robinson <[email protected]>2010-08-03 23:10:00 -0700
commite74976e6451670c433ee09695125801c12e74e22 (patch)
tree227434c3dd5e975ada8f4318bd0d05f953f40de8 /Alc/ALu.c
parent91278608c5d342a9c4322bd6296d0eba9eb3af4c (diff)
Use a callback to specify the source update method
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 7684a86f..7270cc16 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -113,7 +113,7 @@ static __inline ALvoid aluMatrixVector(ALfloat *vector,ALfloat w,ALfloat matrix[
vector[2] = temp[0]*matrix[0][2] + temp[1]*matrix[1][2] + temp[2]*matrix[2][2] + temp[3]*matrix[3][2];
}
-static ALvoid CalcNonAttnSourceParams(const ALCcontext *ALContext, ALsource *ALSource)
+ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
{
ALfloat SourceVolume,ListenerGain,MinVolume,MaxVolume;
ALfloat DryGain, DryGainHF;
@@ -194,7 +194,7 @@ static ALvoid CalcNonAttnSourceParams(const ALCcontext *ALContext, ALsource *ALS
}
}
-static ALvoid CalcSourceParams(const ALCcontext *ALContext, ALsource *ALSource)
+ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
{
const ALCdevice *Device = ALContext->Device;
ALfloat InnerAngle,OuterAngle,Angle,Distance,DryMix,OrigDist;
@@ -635,11 +635,7 @@ static void MixSource(ALsource *ALSource, ALCcontext *ALContext,
if(ALSource->NeedsUpdate)
{
- //Only apply 3D calculations for mono buffers
- if(Channels == 1)
- CalcSourceParams(ALContext, ALSource);
- else
- CalcNonAttnSourceParams(ALContext, ALSource);
+ ALsource_Update(ALSource, ALContext);
ALSource->NeedsUpdate = AL_FALSE;
}