Dispose sound sources

This commit is contained in:
Gustas
2024-04-24 18:10:30 +03:00
committed by Matthias Mailänder
parent 84e6623773
commit d91d1f5466

View File

@@ -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);