fix thread contention for audio tweens
parent
0d441ae07a
commit
0781a99273
|
@ -194,17 +194,17 @@ namespace MoonWorks.Audio
|
|||
float end,
|
||||
float duration
|
||||
) {
|
||||
var tween = AudioTweenPool.Obtain();
|
||||
tween.SoundInstanceReference = new WeakReference<SoundInstance>(soundInstance);
|
||||
tween.Property = property;
|
||||
tween.EasingFunction = easingFunction;
|
||||
tween.Start = start;
|
||||
tween.End = end;
|
||||
tween.Duration = duration;
|
||||
tween.Time = 0;
|
||||
|
||||
lock (StateLock)
|
||||
{
|
||||
var tween = AudioTweenPool.Obtain();
|
||||
tween.SoundInstanceReference = new WeakReference<SoundInstance>(soundInstance);
|
||||
tween.Property = property;
|
||||
tween.EasingFunction = easingFunction;
|
||||
tween.Start = start;
|
||||
tween.End = end;
|
||||
tween.Duration = duration;
|
||||
tween.Time = 0;
|
||||
|
||||
AudioTweens.Add(tween);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue