Skip to content

Commit

Permalink
Dispose sound sources
Browse files Browse the repository at this point in the history
  • Loading branch information
PunkPun authored and Mailaender committed May 4, 2024
1 parent 84e6623 commit d91d1f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenRA.Platforms.Default/OpenAlSoundEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ void Dispose(bool disposing)
if (disposing)
StopAllSounds();

if (sourcePool.Count > 0)
AL10.alDeleteSources(PoolSize, sourcePool.Keys.ToArray());

sourcePool.Clear();

if (context != IntPtr.Zero)
{
ALC10.alcMakeContextCurrent(IntPtr.Zero);
Expand Down

0 comments on commit d91d1f5

Please sign in to comment.