I am trying to add background music to my Windows based XNA 4 game. When i do
Song bgm = Content.Load<Song>("bgm"); MediaPlayer.Play(bgm);
in the MyGame.LoadContent
method, I get an InvalidOperationException
message with the message "Song playback failed. Make sure the song is not DRM protected. Protected DRM songs are not supported for authors games." The song is in MP3 format and is not protected. I tried using WAV instead, and the result was the same.
It seems I'm not the only one who has this problem . But the closest I found for a solution is to use XACT.
Any ideas?
Edit: Also, why is my code fragment not syntax highlighted? It was highlighted in the preview.
source share