Skip to content

Commit

Permalink
Merge pull request MonoGame#1974 from SickheadGames/xaudioshutdown
Browse files Browse the repository at this point in the history
Fixed XAudio Shutdown
  • Loading branch information
dellis1972 committed Sep 16, 2013
2 parents 17185a8 + 2c245ba commit 292d29b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions MonoGame.Framework/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ additional consumer rights under your local laws which this license cannot
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
#endif

using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
Expand Down Expand Up @@ -235,11 +235,16 @@ protected virtual void Dispose(bool disposing)
ContentTypeReaderManager.ClearTypeCreators();

#if WINDOWS_PHONE
TouchPanel.ResetState();
Microsoft.Xna.Framework.Audio.SoundEffect.Shutdown();
TouchPanel.ResetState();
#endif

#if WINDOWS_MEDIA_SESSION
Media.MediaManagerState.CheckShutdown();
#endif

#if DIRECTX
SoundEffect.Shutdown();

BlendState.ResetStates();
DepthStencilState.ResetStates();
RasterizerState.ResetStates();
Expand Down Expand Up @@ -739,6 +744,10 @@ internal void DoExiting()
OnExiting(this, EventArgs.Empty);
UnloadContent();

#if DIRECTX
SoundEffect.Shutdown();
#endif

#if WINDOWS_MEDIA_SESSION
Media.MediaManagerState.CheckShutdown();
#endif
Expand Down

0 comments on commit 292d29b

Please sign in to comment.