XNA声音播放问题

XNA声音播放问题,xna,xna-4.0,Xna,Xna 4.0,我目前正在开发一款XNA游戏,但是当我命令它播放mp3文件时,当我的文件没有DRM保护时,它会抛出一个DRM错误。有人能解释一下为什么会发生这种情况吗 public class SoundEffects : GameComponent { private Song explosion; private Song thunder; public SoundEffects(Game game):base(game) {

我目前正在开发一款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);
    }
公共类音效:游戏组件
{
私歌爆炸;
私歌雷;
公共音效(游戏):基础(游戏)
{
爆炸=游戏.Content.Load(“爆炸”);
thunder=Game.Content.Load(“thunder”);
}
/*受保护的覆盖void LoadContent()
{ 
explosion=Game.Content.Load(“explosion”);//输入歌曲名称,而不是“歌曲标题”
thunder=Game.Content.Load(“thunder”);//输入歌曲名称,而不是“歌曲标题”
}*/
公共空间播放音乐预告()
{
MediaPlayer.Play(打雷);
}
公共空间播放音乐爆炸()
{
MediaPlayer.Play(这个爆炸);
}

如果您试图在设备通过Zune连接到PC时播放歌曲文件,它将引发异常(DRM)。您可以在断开设备连接后测试游戏,也可以使用WPconnect工具(我相信是在10月份的WPDT更新中),而不是使用Zune

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

为什么要使用
歌曲
进行音效处理?为什么不使用
音效
?为什么要使用
歌曲
进行音效处理?为什么不使用
音效