Chapter 9. Adding Sound with XACT
This chapter takes a closer look at XACT. XACT is the name for Microsoft's Cross-Platform Audio Creation Tool, which allows you to create audio projects for the Windows and Xbox 360 platforms. It is actually the only way to play sounds in XNA on the Xbox 360. It doesn't matter so much for the Windows platform because you can plug in any other sound engine you want (DirectSound of DirectX, OpenAL, FMod, and so on) and play sound or music this way. It is not that easy on the Xbox 360 because you can use only the XNA Framework here and it is absolutely not possible to use any other framework for playing sound but XACT because you cannot use any unmanaged code in XNA. To play sound or use any low-level hardware on the Xbox 360, you would need unmanaged code to access it. For the same reason you cannot use any other graphics or input engine than the one XNA provides for you.
XACT was implemented into XNA to make sure it is possible to use the same sound content and sound playback code for both the Windows and the Xbox 360 platforms. For example, the Xbox 360 supports only XMA compression; the PC uses other compression formats for sound and music such as MP3, OGG, ADPCM, and many other custom compression formats, but only ADPCM and uncompressed sound files are supported in XACT. Voice-over-IP applications often use their own proprietary sound compression format because the human voice can be compressed better than music, for example. Luckily, XNA does ...
Get Professional XNA™ Programming: Building Games for Xbox 360™ and Windows® with XNA Game Studio 2.0, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.