MonoGame: Music does not stop playing upon exit of game

by Claus Volko   Last Updated August 13, 2019 15:13 PM

I use MediaPlayer to play the background music. Sometimes, the music does not stop playing when I exit the game. This is even though I use the following code:

    protected override void OnExiting(Object sender, EventArgs args)
    {
        base.OnExiting(sender, args);

        MediaPlayer.Stop();
    }

What is wrong?

Tags : monogame


Related Questions


Updated April 12, 2018 18:13 PM

Updated November 25, 2018 12:13 PM

Updated December 20, 2017 01:13 AM

Updated June 21, 2018 11:13 AM