aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-11-25 16:21:47 -0800
committerChris Robinson <[email protected]>2009-11-25 16:21:47 -0800
commit658923175f65b5f1da182dced0b86fb32c5598cc (patch)
tree5e57af0f6c1574f3f9068e1fa8f484661f1b6fbc /Alc/ALu.c
parent877f4340ba509ed9b31b2de4bcbb11c1befaf3ed (diff)
Update source parameters only when they need changing
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 5 insertions, 1 deletions
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;