Hot answers tagged c#
The code you have there appears to be just fine. The alternative would be to use a custom ContentManager that allowed you to Dispose of the Song objects directly, rather than having to go through Unload. See this blog post for details. A minor nit-pick: You set IsRepeating after you call Play. Theoretically this is a race condition: the song could end ...
Only top voted, non community-wiki answers of a minimum length are eligible