문제

My code: Variables:

    //Menu Song
    Song mainMenuTheme;
    bool songstart = false;

LoadContent() method:

    //Load the song
    mainMenu = Content.Load<Song>("musics\\mainMenuTheme");
    MediaPlayer.IsRepeating = true;

In the Update() method:

    //Start the song
    if (!songstart)
    {
    MediaPlayer.Play(mainMenuTheme);
    songstart = true;
    }

So the song is in .wma format, 6.32MB and the duration is 00:01:36. How to make the WHOLE song loop? Because when I start debugging it cuts off after a while and loops again. Any suggestions?

도움이 되었습니까?

해결책

Try using .mp3 instead of .wma for Song class.
Your code seems corrert.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top