From 658923175f65b5f1da182dced0b86fb32c5598cc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 25 Nov 2009 16:21:47 -0800 Subject: Update source parameters only when they need changing --- Alc/ALu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Alc/ALu.c') diff --git a/Alc/ALu.c b/Alc/ALu.c index 01621f6f..6b7dc364 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -888,7 +888,11 @@ another_source: DataPosInt = ALSource->position; DataPosFrac = ALSource->position_fraction; - CalcSourceParams(ALContext, ALSource, (Channels==1)?AL_TRUE:AL_FALSE); + if(ALSource->NeedsUpdate) + { + CalcSourceParams(ALContext, ALSource, (Channels==1)?AL_TRUE:AL_FALSE); + ALSource->NeedsUpdate = AL_FALSE; + } /* Compute 18.14 fixed point step */ Pitch = (ALSource->Params.Pitch*Frequency) / DeviceFreq; -- cgit v1.2.3