• Advertisement
Sign in to follow this  

XACT Initialization issues

This topic is 2828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently trying to implement XACT into my game, however I'm having issues with initializing the engine. The engine is created fine, but when the initialize function is called, I get a return error of E_INVALIDARG when I check the HRESULT. The irritating thing about this issue is that the exact same code will work on 2 other computers, but not my own, and I cannot see why! The only differences I can think of is that in my own computer I've got a SoundBlaster X-Fi (latest drivers etc) whereas the other two I believe have on-board audio, and to my knowledge I'm running the Feb 2010 DirectX SDK as opposed to the others running the Aug 2009 DirectX SDK. Also my computer runs Vista Home Premium, and the others run Windows 7 Pro, and Vista Business 64-bit respectively. Has anyone else run into similar problems? I've scoured both Google and GDNet forums to no avail. Any help would be appreciated. I really like the ease of use XACT offers (if I can get it working). Code as follows:
bool PSAudio::Initialize()
{
	PSAppLayer::AppLayer()->Log("Initializing Audio");

	// Init COM
	if(!PSUtility::CheckHR(CoInitializeEx(NULL,COINIT_MULTITHREADED)))
	{
		PSAppLayer::AppLayer()->Log("COM failed to initialize!");
		return false;
	}

	// Create the XACT engine
	if(!PSUtility::CheckHR(XACT3CreateEngine(0, &m_XEngine)))
	{
		PSAppLayer::AppLayer()->Log("XACT Engine failed to be created!");
		return false;
	}
	PSAppLayer::AppLayer()->Log("XACT Engine Created");

	// Initialize the XACT engine
	XACT_RUNTIME_PARAMETERS eParameters = {0};
	if(!PSUtility::CheckHR(m_XEngine->Initialize(&eParameters))) // Fails at this call
	{
		PSAppLayer::AppLayer()->Log("XACT Engine failed to be initialized!");
		return false;
	}

	PSAppLayer::AppLayer()->Log("XACT Engine Initialized");
	return m_Initialized = true;
}

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement