1

我目前正在开发 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);
    }
4

1 回答 1

1

如果您在设备通过 Zune 连接到 PC 时尝试播放歌曲文件,则会引发异常 (DRM)。您可以在断开设备连接后测试游戏,或者使用 WPconnect 工具代替 Zune(我相信这是在 10 月的 WPDT 更新中)

于 2010-11-29T14:26:30.637 回答