From 2d3615a1fe7ea09e23da999090a8fbea19c5d646 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Tue, 11 Feb 2014 07:06:36 -0600 Subject: Moves song to SoundEffect --- SuperPolarity/Content/Sound/polaritytheme.wav | Bin 48384044 -> 0 bytes SuperPolarity/Content/Sound/polaritytheme.wma | Bin 6617551 -> 0 bytes SuperPolarity/Content/Sound/polaritytheme.xnb | Bin 131 -> 48384105 bytes SuperPolarity/SuperPolarity.cs | 21 +++++++++++---------- SuperPolarity/SuperPolarity.csproj | 6 ------ 5 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 SuperPolarity/Content/Sound/polaritytheme.wav delete mode 100644 SuperPolarity/Content/Sound/polaritytheme.wma (limited to 'SuperPolarity') diff --git a/SuperPolarity/Content/Sound/polaritytheme.wav b/SuperPolarity/Content/Sound/polaritytheme.wav deleted file mode 100644 index 28a6bce..0000000 Binary files a/SuperPolarity/Content/Sound/polaritytheme.wav and /dev/null differ diff --git a/SuperPolarity/Content/Sound/polaritytheme.wma b/SuperPolarity/Content/Sound/polaritytheme.wma deleted file mode 100644 index e4ea8b8..0000000 Binary files a/SuperPolarity/Content/Sound/polaritytheme.wma and /dev/null differ diff --git a/SuperPolarity/Content/Sound/polaritytheme.xnb b/SuperPolarity/Content/Sound/polaritytheme.xnb index d2c29f9..8d20f40 100644 Binary files a/SuperPolarity/Content/Sound/polaritytheme.xnb and b/SuperPolarity/Content/Sound/polaritytheme.xnb differ diff --git a/SuperPolarity/SuperPolarity.cs b/SuperPolarity/SuperPolarity.cs index 12303a0..7fa387c 100644 --- a/SuperPolarity/SuperPolarity.cs +++ b/SuperPolarity/SuperPolarity.cs @@ -29,8 +29,8 @@ namespace SuperPolarity Screen EntryScreen; - protected Song TitleSong; - protected Song GameSong; + protected SoundEffect GameSong; + protected SoundEffectInstance GameSongHandle; protected SoundEffect GameOverSound; public SuperPolarity() @@ -39,6 +39,11 @@ namespace SuperPolarity graphics = new GraphicsDeviceManager(this); Components.Add(new GamerServicesComponent(this)); + graphics.PreferMultiSampling = true; + graphics.PreferredBackBufferHeight = 720; + graphics.PreferredBackBufferWidth = 1280; + //graphics.ToggleFullScreen(); + Content.RootDirectory = "Content"; ActorFactory.SetGame(this); ParticleEffectFactory.SetGame(this); @@ -58,11 +63,6 @@ namespace SuperPolarity { base.Initialize(); - graphics.PreferMultiSampling = true; - graphics.PreferredBackBufferHeight = 720; - graphics.PreferredBackBufferWidth = 1280; - //graphics.ToggleFullScreen(); - InputController.RegisterEventForKey("fullScreenToggle", Keys.F11); InputController.Bind("fullScreenToggle", HandleFullScreenToggle); @@ -85,7 +85,8 @@ namespace SuperPolarity { MediaPlayer.IsRepeating = true; - GameSong = Content.Load("Sound\\polaritytheme"); + GameSong = Content.Load("Sound\\polaritytheme"); + GameSongHandle = GameSong.CreateInstance(); GameOverSound = Content.Load("Sound\\gameover"); // Create a new SpriteBatch, which can be used to draw textures. @@ -144,7 +145,7 @@ namespace SuperPolarity // temp stuff before media manager is in if (songName == "game") { - MediaPlayer.Play(GameSong); + GameSongHandle.Play(); } } @@ -153,7 +154,7 @@ namespace SuperPolarity var scoreScreen = new ScoreScreen(this); scoreScreen.Initialize(); - MediaPlayer.Stop(); + GameSongHandle.Stop(); GameOverSound.Play(); ScreenManager.Pop(); ScreenManager.Push(scoreScreen); diff --git a/SuperPolarity/SuperPolarity.csproj b/SuperPolarity/SuperPolarity.csproj index b998b92..6dbd4ba 100644 --- a/SuperPolarity/SuperPolarity.csproj +++ b/SuperPolarity/SuperPolarity.csproj @@ -94,12 +94,6 @@ - - Always - - - Always - SDL.dll -- cgit