initialize audio tween pool with 16 instances
parent
c0ed7bc13d
commit
34aa069d6b
|
@ -26,7 +26,15 @@ namespace MoonWorks.Audio
|
|||
|
||||
internal class AudioTweenPool
|
||||
{
|
||||
private Queue<AudioTween> Tweens = new Queue<AudioTween>();
|
||||
private Queue<AudioTween> Tweens = new Queue<AudioTween>(16);
|
||||
|
||||
public AudioTweenPool()
|
||||
{
|
||||
for (int i = 0; i < 16; i += 1)
|
||||
{
|
||||
Tweens.Enqueue(new AudioTween());
|
||||
}
|
||||
}
|
||||
|
||||
public AudioTween Obtain()
|
||||
{
|
||||
|
|
|
@ -106,7 +106,6 @@ namespace MoonWorks.Audio
|
|||
) {
|
||||
if (AudioTweens.TryGetValue((audioTween.SoundInstanceReference, audioTween.Property), out var currentTween))
|
||||
{
|
||||
Logger.LogInfo("overriding tween!");
|
||||
AudioTweenPool.Free(currentTween);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue