(ded4a3e0a) v0.9.0.7

This commit is contained in:
Joonas Rikkonen
2019-06-25 16:00:44 +03:00
parent e5ae622c77
commit 4a51db77b5
1777 changed files with 421528 additions and 917 deletions
@@ -174,8 +174,8 @@ namespace Barotrauma.Sounds
sourcePools[(int)SourcePoolIndex.Default] = new SoundSourcePool(SOURCE_COUNT);
playingChannels[(int)SourcePoolIndex.Default] = new SoundChannel[SOURCE_COUNT];
sourcePools[(int)SourcePoolIndex.Voice] = new SoundSourcePool(8);
playingChannels[(int)SourcePoolIndex.Voice] = new SoundChannel[8];
sourcePools[(int)SourcePoolIndex.Voice] = new SoundSourcePool(16);
playingChannels[(int)SourcePoolIndex.Voice] = new SoundChannel[16];
Al.DistanceModel(Al.LinearDistanceClamped);
@@ -202,7 +202,10 @@ namespace Barotrauma.Sounds
}
Sound newSound = new OggSound(this, filename, stream);
loadedSounds.Add(newSound);
lock (loadedSounds)
{
loadedSounds.Add(newSound);
}
return newSound;
}
@@ -225,7 +228,10 @@ namespace Barotrauma.Sounds
newSound.BaseFar = range;
}
loadedSounds.Add(newSound);
lock (loadedSounds)
{
loadedSounds.Add(newSound);
}
return newSound;
}
@@ -352,12 +358,15 @@ namespace Barotrauma.Sounds
public void RemoveSound(Sound sound)
{
for (int i = 0; i < loadedSounds.Count; i++)
lock (loadedSounds)
{
if (loadedSounds[i] == sound)
for (int i = 0; i < loadedSounds.Count; i++)
{
loadedSounds.RemoveAt(i);
return;
if (loadedSounds[i] == sound)
{
loadedSounds.RemoveAt(i);
return;
}
}
}
}