diff options
author | Chris Robinson <[email protected]> | 2009-11-25 16:21:47 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-11-25 16:21:47 -0800 |
commit | 658923175f65b5f1da182dced0b86fb32c5598cc (patch) | |
tree | 5e57af0f6c1574f3f9068e1fa8f484661f1b6fbc /Alc | |
parent | 877f4340ba509ed9b31b2de4bcbb11c1befaf3ed (diff) |
Update source parameters only when they need changing
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |