Joel Martinez

I'll admit that I haven't even investigated whether this is possible or not. Figure I'll start by asking whether it's even feasible, or if there is another technique I should be thinking about.

What I'm looking to do will involve dynamically generating .wav files during the build process of certain assets. Since all audio must be pre-processed via XACT, I was wondering if there was some way of programmatically generating an XACT project file, and then building it.

Ideally, this will result in audio code that is both dynamic (ie. generated by the content pipeline), and compatible with the XBox 360.


Re: XNA Framework Dynamically generated XACT projects

Shawn Hargreaves - MSFT

That sounds feasible to me, although it will certainly involve some work :-)

I'm not aware of any docs on the XACT project file format, but looking at these they appear to be plain text, so it should be reasonably straightforward to figure out what you need to put in one to generate it programatically.

To build, you can either just shell out to the commandline XACT build tool, or use the BuildXact task provided in the content pipeline assembly (that's just an MSBuild wrapper around the commendline build tool, plus some extra magic to only bother shelling out to the tool if the files are out of date).