我目前正在开发 XNA 游戏,但是当我命令它播放 mp3 文件时,当我的文件不受 DRM 保护时,它会引发 DRM 错误。谁能向我解释为什么会这样?
public class SoundEffects : GameComponent
{
private Song explosion;
private Song thunder;
public SoundEffects(Game game):base(game)
{
explosion = Game.Content.Load<Song>("explosion");
thunder = Game.Content.Load<Song>("thunder");
}
/*protected override void LoadContent()
{
explosion = Game.Content.Load<Song>("explosion"); // Put the name of your song in instead of "song_title"
thunder = Game.Content.Load<Song>("thunder"); // Put the name of your song in instead of "song_title"
}*/
public void playMusicThunder()
{
MediaPlayer.Play(thunder);
}
public void playMusicExplosion()
{
MediaPlayer.Play(this.explosion);
}