Search code examples
xnaxna-4.0xact

Creating XNA AudioEngine on windows game project


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?


Solution

  • 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.