diff --git a/OpenRA.Platforms.Default/OpenAlSoundEngine.cs b/OpenRA.Platforms.Default/OpenAlSoundEngine.cs index fd40e5be71..ef20e13640 100644 --- a/OpenRA.Platforms.Default/OpenAlSoundEngine.cs +++ b/OpenRA.Platforms.Default/OpenAlSoundEngine.cs @@ -371,6 +371,11 @@ namespace OpenRA.Platforms.Default if (disposing) StopAllSounds(); + if (sourcePool.Count > 0) + AL10.alDeleteSources(PoolSize, sourcePool.Keys.ToArray()); + + sourcePool.Clear(); + if (context != IntPtr.Zero) { ALC10.alcMakeContextCurrent(IntPtr.Zero);