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