Home | Games | Awards | About | Blog | Media | Contact | Other
xWMA with XACT in XNA Game Studio 3.1
Wednesday, December 08, 2010
By: Jason Doucette
(printer friendly version)

Problem:

If you are using XNA Game Studio 3.1, and attempting to use the much better (nearly 50% the size) xWMA compression rather than the standard XMA compression, then you will notice that Visual Studio will hang up during compilation. Checking the Windows Task Manager will show XactBld3.exe is stalled.  Ctrl+Alt+Del'ing this compilation of XACT will allow the build to continuing, but you will not have the audio built properly.  This issue has been resolved in XNA Game Studio 4.0, however many developers are still using XNA game Studio 3.1, since 4.0 offers a great many breaking changes.

Solution:

FlipperAnubi on the App Hub forums offers a solution.  Replace XactBld3.exe with our own program, that launches the original XactBld3.exe.  Our program will run in a console window, and the output from that program will flow harmlessly to the console window.  It is this output that apparently is causing the original XactBld3.exe to hang up Visual Studio.  The steps for this solution are as follows:

Step #1. Rename the original XactBld3.exe

Go into C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v3.1\Tools and rename XactBld3.exe to ORIGINAL_XactBld3.exe

Step #2. Create our own program to replace XactBld3.exe

Compile the following program, name is XactBld3.exe, and replace the original with it in C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v3.1\Tools.

using System;
using System.Diagnostics;
namespace XactBld3_Wrapper
{
 class XactBld3_Wrapper
 {
  static void Main(string[] args)
  {
   string argumentString = String.Empty;
   foreach (string argument in args)
   {
    if (argument.Contains(" "))
     argumentString = argumentString + "\"" + argument + "\" ";
    else
     argumentString = argumentString + argument + " ";
   }
   string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
   int index = path.LastIndexOf('\\');
   path = path.Substring(0, index + 1);
   Console.WriteLine("Attempting to execute XACT...");
   Process xactProcess = new Process();
   xactProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
   xactProcess.StartInfo.FileName = path + "ORIGINAL_XactBld3.exe";
   xactProcess.StartInfo.Arguments = argumentString;
   xactProcess.Start();
   xactProcess.WaitForExit();
  }
 }
}

Conclusion

Try compiling a build with XACT using xWMA now, and you should see your own program run in a console window with a ton of verbose output from XactBld3.exe, and this should no longer hang up Visual Studio. Enjoy the 2x compression rate over WMA (at least, in the default compression settings of 60).

 

More Indie Articles:

2011/Jul/27 Xbox LIVE Indie Games Should Be Doing More
2011/Jun/08 Photoshop: How To Delete Off-Canvas Content
2011/Jan/05 Revolver360 Top Xbox LIVE Indie Game in Japan
2010/Dec/30 Vote to Include Indie Games in "Best of 2010" Xbox LIVE Dashboard Promotion
2010/Dec/29 Indie Game Winter Uprising Featured on Xbox LIVE Dashboard
2010/Dec/21 Indie Games Winter Uprising Quality Analysis
2010/Dec/08 xWMA with XACT in XNA Game Studio 3.1
2010/Dec/06 Microsoft, We Need More Than 50 XBLIG Tokens!
2010/Dec/01 XBLIG Top Rated & Best Selling Country Lists
2010/Nov/30 Indie Games Winter Uprise Trailer
2010/Nov/18 Indie Games Winter Uprising
2010/Nov/17 Improve Traffic Flow to XBLA and XBLIG: More Proposed Changes to Xbox LIVE Dashboard
2010/Nov/15 Xona Proposal: Changing the Face of XBLIG: Proposed Changes to XBLIG Dashboard (Final Draft)
2010/Nov/05 Windows Phone 7 Emulator & Fraps Color Problem
2010/Nov/04 Why We Should Encourage "Crap" XBLIG Games
2010/Nov/02 XBLIG Dashboard Worries Continued...
2010/Nov/01 Changing the Face of XBLIG: Proposed Changes to XBLIG Dashboard (First Draft)
2010/Oct/22 The 1st Annual "Who's An Indie Gamer?" Poll Survey
2010/Jul/29 Game Rain #1 - Win 1 of 21 Xbox LIVE Indie Games
2010/Jul/20 Mark Rein's Apology w/ Great Indie Advice
2010/Jul/19 New Xbox LIVE Indie Games Roundup Show
2010/May/24 Top 50 Xbox Forum Communities in XBLIG
2010/May/04 Great Indie Game Developer Advice
2010/May/03 Multidirectional XNA Games Control Tip
2009/Dec/20 MIGS 2009 Wrap Up

External Links:

 

About the Author: I am Jason Doucette of Xona Games, an award-winning, indie game studio I run with my twin brother. We make intense retro games. Our company, our games, and our engine technology have all won prestigious awards and received worldwide press. Our games have ranked from #1 in Canada to #1 in Japan, as well as become #1 best sellers in multiple countries. Read about our story and our blog.


Email:
Xona Games, Xona.com, Xonatech, Saw Tooth Distortion, Duality ZF, Decimation X, Decimation X2, Decimation X3, and Score Rush
trademarked and copyrighted by Xona Games, Inc., Jason Doucette, and Matthew Doucette.
© Xona Games, Inc.