Skip to content

Commit

Permalink
- FIX: for OpenALSoundController -- collection is modified when multi…
Browse files Browse the repository at this point in the history
…ple thread is accessing it
  • Loading branch information
christallire committed Jan 30, 2015
1 parent e3acb7f commit 3bccc91
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions MonoGame.Framework/Audio/OpenALSoundController.cs
Expand Up @@ -462,12 +462,15 @@ public void Update()
}
}
}
foreach (var soundBuffer in purgeMe)
lock (purgeMe)
{
AL.Source(soundBuffer.SourceId, ALSourcei.Buffer, 0);
RecycleSource(soundBuffer);
foreach (var soundBuffer in purgeMe)
{
AL.Source(soundBuffer.SourceId, ALSourcei.Buffer, 0);
RecycleSource(soundBuffer);
}
purgeMe.Clear();
}
purgeMe.Clear();
}

#if ANDROID
Expand Down

2 comments on commit 3bccc91

@mgbot
Copy link
Member

@mgbot mgbot commented on 3bccc91 Jan 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity MonoGame :: Develop (Win) Build 3.3.0.1991 is now running

@mgbot
Copy link
Member

@mgbot mgbot commented on 3bccc91 Jan 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity MonoGame :: Develop (Win) Build 3.3.0.1991 outcome was FAILURE
Summary: Tests passed: 303, ignored: 6; exit code 1 (new) Build time: 00:12:47

Please sign in to comment.