我目前正在开发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);
}
答案 0 :(得分:1)
如果您在设备通过Zune连接到PC时尝试播放歌曲文件,则会抛出异常(DRM)。你可以在断开设备后测试游戏,或者不使用Zune使用WPconnect工具(我认为是在10月WPDT更新中)