The applications background music overlaps the users selected music

To solve this issue this was the approach that I took. I added code in the constructor for the game to call the guide and ask a what music he wants. There is a boolean to control which sound is played.

if (askForMusic && !MediaPlayer.GameHasControl)
           {
               if (!Guide.IsVisible)
               {
                   Guide.BeginShowMessageBox(“Select Music Of Choice”, “Do you want to play the game music”,

                   new List<string> { “Yes”, “No” }, 0, MessageBoxIcon.Alert,

                   asyncResult =>
                   {

                       int? returned = Guide.EndShowMessageBox(asyncResult);
                       if (returned == 0)
                       {
                           MediaPlayer.Stop();
                           playMusic = true;
                       }
                   }, null);
               }
               askForMusic = false;
           }

2 thoughts on “The applications background music overlaps the users selected music

  1. Pingback: Submitted my aplication into the market and did not make it in. « Personal Project « alfredoalvarez.com

  2. Glad that it could help if you have any question on xna reach profile i can try to help. Good luck coding.

Leave a Reply