XNA,游戏加载的时候加载声音就会异常,麻烦帮解决下

Valkry 2009-04-11 12:41:43
异常信息“XACT could not load the data provided. Make sure you are using the correct version of the XACT tool.”

static public AudioEngine audio;
static public WaveBank wave;
static public SoundBank soundBank;

static public Cue[] cue;

/// <summary>
/// 初始化声音
/// </summary>
public static void InitSound()
{
checked
{
try
{
audio = new AudioEngine("sounds/chess.xap");
wave = new WaveBank(audio, "sounds/Wave Bank.xwb");
soundBank = new SoundBank(audio, "sounds/Sound Bank.xsb");
cue = new Cue[4];
}
catch(ArgumentException e)
{
Console.Write(e.Message+"");
throw e;
return;
}
}

}
执行到 audio = new AudioEngine("sounds/chess.xap");就抛出异常了。
麻烦帮解决下
...全文
119 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
beyondfancy 2009-06-28
  • 打赏
  • 举报
回复
上边的不对
Valkry 2009-04-14
  • 打赏
  • 举报
回复
这样就会说路径不对了= =。
找不到文件了。
原来的异常信息是“XACT could not load the data provided. Make sure you are using the correct version of the XACT tool.” 这个。。
kkun_3yue3 2009-04-12
  • 打赏
  • 举报
回复
try



audio = new AudioEngine("sounds/chess.xap");


==>


audio = new AudioEngine(@"Content/sounds/chess.xap");
sxmonsy 2009-04-11
  • 打赏
  • 举报
回复
友情UP
cja03 2009-04-11
  • 打赏
  • 举报
回复
好久没玩,帮顶。
到XNA中文社区问问。

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧