Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Targetting Win7 with XAUDIO2

  • You cannot reply to this topic
2 replies to this topic

#1 Fredericvo   Members   -  Reputation: 421


Posted 04 September 2014 - 12:01 PM

I wanted to give XAUDIO2 a shot and after compilation I got missing xaudio2_8.dll errors on my windows 7 system.

I use VS 2012 Express and the win8 SDK, as recommended by MS for DirectX 11 development.

After a few Google searches and articles read it seems that this is normal as it's a Windows 8 dll not found on a 7 system.

Apparently, the solution to target "down" is to include the xaudio.h header file from the June 2010 SDK. Now, I don't want to undo all my efforts to forget about this SDK and legacy D3DX cruft and add the June 2010 SDK again to my VC++ include directories because then it will again include the wrong stuff for everything else and I will again get macro redifinition warnings which I believe are only the top of an iceberg of other hidden problems. I googled further and found this solution:

#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
#include <xaudio2.h>
#pragma comment(lib,"xaudio2.lib")
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\comdecl.h>
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2.h>
However, it still claims comdecl.h and a myriad of others can't be found, and the file where this happens is xaudio2.h, which I assume includes comdecl the relative way. I hope there is a better solution than to modify xaudio2.h ?
It seems that I'm not the only one struggling with this:


#2 kubera   Members   -  Reputation: 946


Posted 29 September 2014 - 04:06 PM

Please read this blog:


#3 Buckeye   Crossbones+   -  Reputation: 5644


Posted 07 October 2014 - 09:14 AM

I don't know how deep you want to get into xaudio2, but you may want to look into the DirectX Toolkit. In particular, look at Audio.h in that package and see if the wrapper serves your needs. It uses DX SDK libraries but you can load them by full path without adding the DXSDK to your include/library directories -


#pragma comment(lib,"c:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\lib\\x86\\x3daudio.lib")
#pragma comment(lib,"c:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\lib\\x86\\xapofx.lib")

That approach, of course, adds the DXTK libraries to your dependencies, but may get you started. The DXTK may also provide you with an implementation approach you can work with.

Edited by Buckeye, 07 October 2014 - 09:17 AM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.