Creating XNA AudioEngine on windows game project

岁酱吖の 提交于 2020-01-22 02:51:05

问题


I'm reading this book "Learning XNA 4.0", and in chapter 6 it teaches how to play sounds using XACT Audio files. It asks me to create an AudioEngine object, but I can't find that class.AudioEngine

I have the right using statement (Microsoft.Xna.Framework.Audio) and the right reference (microsoft.xna.framework.dll).

does anybody have any idea whats wrong?


回答1:


This is an error in the documentation. AudioEngine is actually in the Microsoft.Xna.Framework.Xact assembly. Add a reference to that, and everything should work as expected.

Note that XACT is not available on Windows Phone 7 (this is why it is in a separate assembly). If you plan to go mobile later, use SoundEffect instead.



来源:https://stackoverflow.com/questions/8389044/creating-xna-audioengine-on-windows-game-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!