diff --git a/OpenRA.Game/Sound/Sound.cs b/OpenRA.Game/Sound/Sound.cs index 8eaf3772cd..cd047ab6c2 100644 --- a/OpenRA.Game/Sound/Sound.cs +++ b/OpenRA.Game/Sound/Sound.cs @@ -44,7 +44,7 @@ namespace OpenRA ISound music; ISound video; MusicInfo currentMusic; - Dictionary currentSounds = new Dictionary(); + readonly Dictionary currentSounds = new Dictionary(); readonly Dictionary currentNotifications = new Dictionary(); public bool DummyEngine { get; } @@ -96,7 +96,7 @@ namespace OpenRA Func loadIntoMemory = soundFormat => soundEngine.AddSoundSourceFromMemory( soundFormat.GetPCMInputStream().ReadAllBytes(), soundFormat.Channels, soundFormat.SampleBits, soundFormat.SampleRate); sounds = new Cache(filename => LoadSound(filename, loadIntoMemory)); - currentSounds = new Dictionary(); + currentSounds.Clear(); video = null; }